Index: src/opts/SkMatrix_opts.h |
diff --git a/src/opts/SkMatrix_opts.h b/src/opts/SkMatrix_opts.h |
index 3fb2701e88db1409c4258627d988a161ac70cd60..2d0a142cf1857209c9126f675c8a8dc62c5d529e 100644 |
--- a/src/opts/SkMatrix_opts.h |
+++ b/src/opts/SkMatrix_opts.h |
@@ -89,12 +89,11 @@ static void matrix_affine(const SkMatrix& m, SkPoint* dst, const SkPoint* src, i |
} |
Sk4s trans4(tx, ty, tx, ty); |
Sk4s scale4(sx, sy, sx, sy); |
- Sk4s skew4(kx, ky, kx, ky); // applied to swizzle of src4 |
+ Sk4s skew4(ky, kx, ky, kx); // applied src4, then x/y swapped |
count >>= 1; |
for (int i = 0; i < count; ++i) { |
Sk4s src4 = Sk4s::Load(&src->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); |
+ (trans4 + src4 * scale4 + SkNx_shuffle<1,0,3,2>(src4 * skew4)).store(&dst->fX); |
src += 2; |
dst += 2; |
} |