Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Unified Diff: src/effects/gradients/SkRadialGradient.cpp

Issue 1526523003: Unify some SkNx code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typo Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/opts/SkColorCubeFilter_opts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkRadialGradient.cpp
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index 52d06392e1b39085f322b88eb9a2c696cf376a32..d734aa056a4ad6e96455d2c7692c727cd447c706 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -307,7 +307,7 @@ void shadeSpan_radial_clamp2(SkScalar sfx, SkScalar sdx, SkScalar sfy, SkScalar
dR = dR + ddR;
uint8_t fi[4];
- dist.toBytes(fi);
+ SkNx_cast<uint8_t>(dist).store(fi);
for (int i = 0; i < 4; i++) {
*dstC++ = cache[toggle + fi[i]];
@@ -319,7 +319,7 @@ void shadeSpan_radial_clamp2(SkScalar sfx, SkScalar sdx, SkScalar sfy, SkScalar
Sk4f dist = Sk4f::Min(fast_sqrt(R), max);
uint8_t fi[4];
- dist.toBytes(fi);
+ SkNx_cast<uint8_t>(dist).store(fi);
for (int i = 0; i < count; i++) {
*dstC++ = cache[toggle + fi[i]];
toggle = next_dither_toggle(toggle);
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/opts/SkColorCubeFilter_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698