Harden initial LinearGradient4f tiling

Even with verified/finite inputs, fx can sometimes collapse to infinity.

When that happens, attempting to apply repeat/mirror tiling produces NaN
results and things go south.

Catch these degenerate cases and tile to 0 (for lack of a better idea).

Note: leaving fx == +/- inf in clamp mode should be safe.

BUG=oss-fuzz:6622

Change-Id: I65711020057856b47045f67a52d906336ad1f173
Reviewed-on: https://skia-review.googlesource.com/114090
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
1 file changed