Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index b60ee971f8fe6bae5d102668bfc034abaf3a92dc..7b2683c7bc9c4c9c9f7f8f7114b4b38e1f088a6b 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -892,7 +892,7 @@ void SkLinearGradient::LinearGradientContext::shade4_clamp(int x, int y, SkPMCol |
const float dither[2] = { dither0, dither1 }; |
const float invDx = 1 / dx; |
- if (!SkScalarIsFinite(invDx)) { // dx is effectively zero, gradient is vertical |
+ if (SkScalarNearlyZero(dx)) { // gradient is vertical |
Sk4f c = lerp_color(fx, find_forward(fRecs.begin(), SkTPin(fx, 0.0f, 1.0f))); |
if (fApplyAlphaAfterInterp) { |
fill<true>(dstC, count, c + dither0, c + dither1); |