diff options
author | 2015-09-10 16:38:41 -0700 | |
---|---|---|
committer | 2015-09-10 16:38:41 -0700 | |
commit | 83da2e28e293b852e869b6ec14b4d4055893e5ca (patch) | |
tree | 289f818917e2139a8ab2fcd35b7b80f3d5ec298e /src | |
parent | 85d9178832f4a64c9d80ffb14cb9dab4fe0fa54a (diff) |
Revert of use new shuffle to speed up affine matrix mappts (patchset #3 id:40001 of https://codereview.chromium.org/1333983002/ )
Reason for revert:
Unexpected perf impact, and a whole bunch of new images in gold (mostly invisibly different).
Original issue's description:
> use new shuffle to speed up affine matrix mappts
>
> sse: 25 -> 18
> neon: 95 -> 86
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/e70afc9f48d00828ee6b707899a8ff542b0e8b98
TBR=reed@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1335003002
Diffstat (limited to 'src')
-rw-r--r-- | src/opts/SkMatrix_opts.h | 5 | ||||
-rw-r--r-- | src/opts/SkNx_neon.h | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/opts/SkMatrix_opts.h b/src/opts/SkMatrix_opts.h index 2d0a142cf1..3fb2701e88 100644 --- a/src/opts/SkMatrix_opts.h +++ b/src/opts/SkMatrix_opts.h @@ -89,11 +89,12 @@ 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(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; } diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h index 3d90f878a5..cf149862c5 100644 --- a/src/opts/SkNx_neon.h +++ b/src/opts/SkNx_neon.h @@ -396,11 +396,6 @@ public: #undef SHIFT16 #undef SHIFT8 -template <> -inline SkNf<4,float> SkNx_shuffle_impl<SkNf<4,float>, 1,0,3,2>(const SkNf<4,float>& src) { - return vrev64q_f32(src.fVec); -} - } // namespace #endif//SkNx_neon_DEFINED |