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

Unified Diff: src/opts/SkColorCubeFilter_opts.h

Issue 1650653002: SkNx Load/store: take any pointer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: simplify call sites Created 4 years, 11 months 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/SkMatrix_opts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkColorCubeFilter_opts.h
diff --git a/src/opts/SkColorCubeFilter_opts.h b/src/opts/SkColorCubeFilter_opts.h
index ab8d1d4c9bfec25bfb43f32223b019ab0e328ab1..e0c4c4abad99d83293257a3bb58b0e813b5e0b5b 100644
--- a/src/opts/SkColorCubeFilter_opts.h
+++ b/src/opts/SkColorCubeFilter_opts.h
@@ -59,10 +59,10 @@ void color_cube_filter_span(const SkPMColor src[],
const SkColor lutColor10 = colorCube[ix + i10];
const SkColor lutColor11 = colorCube[ix + i11];
- Sk4f sum = SkNx_cast<float>(Sk4b::Load((const uint8_t*)&lutColor00)) * g0b0;
- sum = sum + SkNx_cast<float>(Sk4b::Load((const uint8_t*)&lutColor01)) * g0b1;
- sum = sum + SkNx_cast<float>(Sk4b::Load((const uint8_t*)&lutColor10)) * g1b0;
- sum = sum + SkNx_cast<float>(Sk4b::Load((const uint8_t*)&lutColor11)) * g1b1;
+ Sk4f sum = SkNx_cast<float>(Sk4b::Load(&lutColor00)) * g0b0;
+ sum = sum + SkNx_cast<float>(Sk4b::Load(&lutColor01)) * g0b1;
+ sum = sum + SkNx_cast<float>(Sk4b::Load(&lutColor10)) * g1b0;
+ sum = sum + SkNx_cast<float>(Sk4b::Load(&lutColor11)) * g1b1;
color = color + sum * Sk4f((float)colorToFactors[x][r]);
}
if (a != 255) {
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/opts/SkMatrix_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698