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

Unified Diff: src/effects/SkColorMatrixFilter.cpp

Issue 1301413006: SkNx_shuffle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: dup Created 5 years, 3 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/core/SkNx.h ('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/SkColorMatrixFilter.cpp
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index d7f0a742955575aeff5399765c03a5a5e4a2ef46..1eedef134382a39c213245594e468a64e792c25d 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -302,10 +302,10 @@ void SkColorMatrixFilter::filterSpan(const SkPMColor src[], int count, SkPMColor
srcf = unpremul(srcf);
}
- Sk4f r4 = Sk4f(srcf.kth<SK_R32_SHIFT/8>());
- Sk4f g4 = Sk4f(srcf.kth<SK_G32_SHIFT/8>());
- Sk4f b4 = Sk4f(srcf.kth<SK_B32_SHIFT/8>());
- Sk4f a4 = Sk4f(srcf.kth<SK_A32_SHIFT/8>());
+ Sk4f r4 = SkNx_dup<SK_R32_SHIFT/8>(srcf);
+ Sk4f g4 = SkNx_dup<SK_G32_SHIFT/8>(srcf);
+ Sk4f b4 = SkNx_dup<SK_B32_SHIFT/8>(srcf);
+ Sk4f a4 = SkNx_dup<SK_A32_SHIFT/8>(srcf);
// apply matrix
Sk4f dst4 = c0 * r4 + c1 * g4 + c2 * b4 + c3 * a4 + c4;
« no previous file with comments | « src/core/SkNx.h ('k') | src/opts/SkColorCubeFilter_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698