diff options
author | mtklein <mtklein@chromium.org> | 2015-09-10 14:16:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-10 14:16:07 -0700 |
commit | a1c0ee40040fa8bb06f5f68ba4bcb3a68f789924 (patch) | |
tree | 5dc5cb538490e254f4fab6f88fe459dd0c5d7ec4 /src/effects/SkColorMatrixFilter.cpp | |
parent | e66fec23afb0e7c02a49baecb2be678abf3a8a63 (diff) |
SkNx_shuffle
This allows us to express shuffles more directly in code while also giving us a
convenient point to platform-specify particular shuffles for particular types.
No specializations yet. Everyone just uses the (pretty good) default option.
BUG=skia:
Review URL: https://codereview.chromium.org/1301413006
Diffstat (limited to 'src/effects/SkColorMatrixFilter.cpp')
-rw-r--r-- | src/effects/SkColorMatrixFilter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp index d7f0a74295..1eedef1343 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; |