diff options
author | mtklein <mtklein@google.com> | 2015-04-27 13:55:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-27 13:55:53 -0700 |
commit | 9a22f489e8722dd83c65f33fb886019d9f60e479 (patch) | |
tree | ef5b6192ffeefba00e5a525e727162bdb8baa2a3 /src/effects | |
parent | 9de16283fdc8cc0d31a84f503578d0ecea4e8297 (diff) |
Revert of Split rsqrt into rsqrt{0,1,2}, with increasing cost and precision on ARM (patchset #2 id:20001 of https://codereview.chromium.org/1109913002/)
Reason for revert:
arm64 typos
Original issue's description:
> Split rsqrt into rsqrt{0,1,2}, with increasing cost and precision on ARM
>
> This is a logical no-op. Everything was using the equivalent of rsqrt1() before, and is now after.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9de16283fdc8cc0d31a84f503578d0ecea4e8297
TBR=reed@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1105233003
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/gradients/SkRadialGradient.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp index 80562dece8..bf3c821f6b 100644 --- a/src/effects/gradients/SkRadialGradient.cpp +++ b/src/effects/gradients/SkRadialGradient.cpp @@ -377,9 +377,10 @@ 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) { - // 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) { |