Index: src/opts/SkBitmapProcState_matrix_neon.h |
diff --git a/src/opts/SkBitmapProcState_matrix_neon.h b/src/opts/SkBitmapProcState_matrix_neon.h |
index 4546f70552749b0aee506a4c14f0b87e9bc0b34f..df151b275c361cf505f31dfb1b62760d3732b593 100644 |
--- a/src/opts/SkBitmapProcState_matrix_neon.h |
+++ b/src/opts/SkBitmapProcState_matrix_neon.h |
@@ -298,15 +298,13 @@ static void SCALE_FILTER_NAME(const SkBitmapProcState& s, |
SkFractionalInt fx; |
{ |
- SkPoint pt; |
- s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf, |
- SkIntToScalar(y) + SK_ScalarHalf, &pt); |
- const SkFixed fy = SkScalarToFixed(pt.fY) - (s.fFilterOneY >> 1); |
+ const SkBitmapProcStateAutoMapper mapper(s, x, y); |
+ const SkFixed fy = SkFractionalIntToFixed(mapper.y()); |
const unsigned maxY = s.fPixmap.height() - 1; |
// compute our two Y values up front |
*xy++ = PACK_FILTER_Y_NAME(fy, maxY, s.fFilterOneY PREAMBLE_ARG_Y); |
// now initialize fx |
- fx = SkScalarToFractionalInt(pt.fX) - (SkFixedToFractionalInt(one) >> 1); |
+ fx = mapper.x(); |
} |
#ifdef CHECK_FOR_DECAL |
@@ -357,15 +355,12 @@ static void AFFINE_FILTER_NAME(const SkBitmapProcState& s, |
SkMatrix::kAffine_Mask)) == 0); |
PREAMBLE(s); |
- SkPoint srcPt; |
- s.fInvProc(s.fInvMatrix, |
- SkIntToScalar(x) + SK_ScalarHalf, |
- SkIntToScalar(y) + SK_ScalarHalf, &srcPt); |
+ const SkBitmapProcStateAutoMapper mapper(s, x, y); |
SkFixed oneX = s.fFilterOneX; |
SkFixed oneY = s.fFilterOneY; |
- SkFixed fx = SkScalarToFixed(srcPt.fX) - (oneX >> 1); |
- SkFixed fy = SkScalarToFixed(srcPt.fY) - (oneY >> 1); |
+ SkFixed fx = SkFractionalIntToFixed(mapper.x()); |
+ SkFixed fy = SkFractionalIntToFixed(mapper.y()); |
SkFixed dx = s.fInvSx; |
SkFixed dy = s.fInvKy; |
unsigned maxX = s.fPixmap.width() - 1; |