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

Unified Diff: src/opts/SkMatrix_opts.h

Issue 1335003002: Revert of use new shuffle to speed up affine matrix mappts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | src/opts/SkNx_neon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkMatrix_opts.h
diff --git a/src/opts/SkMatrix_opts.h b/src/opts/SkMatrix_opts.h
index 2d0a142cf1857209c9126f675c8a8dc62c5d529e..3fb2701e88db1409c4258627d988a161ac70cd60 100644
--- a/src/opts/SkMatrix_opts.h
+++ b/src/opts/SkMatrix_opts.h
@@ -89,11 +89,12 @@
}
Sk4s trans4(tx, ty, tx, ty);
Sk4s scale4(sx, sy, sx, sy);
- Sk4s skew4(ky, kx, ky, kx); // applied src4, then x/y swapped
+ Sk4s skew4(kx, ky, kx, ky); // applied to swizzle of src4
count >>= 1;
for (int i = 0; i < count; ++i) {
Sk4s src4 = Sk4s::Load(&src->fX);
- (trans4 + src4 * scale4 + SkNx_shuffle<1,0,3,2>(src4 * skew4)).store(&dst->fX);
+ Sk4s swz4(src[0].fY, src[0].fX, src[1].fY, src[1].fX); // need ABCD -> BADC
+ (src4 * scale4 + swz4 * skew4 + trans4).store(&dst->fX);
src += 2;
dst += 2;
}
« no previous file with comments | « no previous file | src/opts/SkNx_neon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698