Index: src/effects/gradients/SkRadialGradient.cpp |
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp |
index 80562dece8695b48aafa70cb5b3503b620fa4452..bf3c821f6b7a463cdb0eab7a31f7aea2c5ebeece 100644 |
--- a/src/effects/gradients/SkRadialGradient.cpp |
+++ b/src/effects/gradients/SkRadialGradient.cpp |
@@ -377,9 +377,10 @@ |
} |
} |
+// 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) { |
- // R * R.rsqrt0() is much faster, but it's non-monotonic, which isn't so pretty for gradients. |
- return R * R.rsqrt1(); |
+ return R * R.rsqrt(); |
} |
static inline Sk4f sum_squares(const Sk4f& a, const Sk4f& b) { |