Sk4fLinearGradient fuzzer fixes
authorfmalita <fmalita@chromium.org>
Tue, 1 Nov 2016 20:41:34 +0000 (13:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 1 Nov 2016 20:41:34 +0000 (13:41 -0700)
commitafac581523af9de5e0af0af1dc128cac1b846006
treec4c8965d894e64eae842ad4a6bc0205b3d24c465
parent08ed0d4926e65f41e6db57dbf72efc871eb4d51e
Sk4fLinearGradient fuzzer fixes

1) update in_range() to actually follow the documented rules regarding interval
   open/close endpoints

2) detect cases where the intervals provide negligible advance and fall back
   to using a color average

BUG=skia:5647
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472483002

Review-Url: https://codereview.chromium.org/2472483002
gm/gradients.cpp
src/effects/gradients/Sk4fLinearGradient.cpp