Index: src/effects/gradients/SkRadialGradient.cpp |
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp |
index bf3c821f6b7a463cdb0eab7a31f7aea2c5ebeece..80562dece8695b48aafa70cb5b3503b620fa4452 100644 |
--- a/src/effects/gradients/SkRadialGradient.cpp |
+++ b/src/effects/gradients/SkRadialGradient.cpp |
@@ -377,10 +377,9 @@ void shadeSpan_radial_clamp(SkScalar sfx, SkScalar sdx, |
} |
} |
-// TODO: can we get away with 0th approximatino of inverse-sqrt (i.e. faster than rsqrt)? |
-// seems like ~10bits is more than enough for our use, since we want a byte-index |
static inline Sk4f fast_sqrt(const Sk4f& R) { |
- return R * R.rsqrt(); |
+ // R * R.rsqrt0() is much faster, but it's non-monotonic, which isn't so pretty for gradients. |
+ return R * R.rsqrt1(); |
} |
static inline Sk4f sum_squares(const Sk4f& a, const Sk4f& b) { |