Index: src/opts/SkBitmapProcState_matrix_neon.h |
diff --git a/src/opts/SkBitmapProcState_matrix_neon.h b/src/opts/SkBitmapProcState_matrix_neon.h |
index fbb2a1e00b5e53834cc06f77d25b113e398bc0a6..4546f70552749b0aee506a4c14f0b87e9bc0b34f 100644 |
--- a/src/opts/SkBitmapProcState_matrix_neon.h |
+++ b/src/opts/SkBitmapProcState_matrix_neon.h |
@@ -38,13 +38,10 @@ static void SCALE_NOFILTER_NAME(const SkBitmapProcState& s, |
const unsigned maxX = s.fPixmap.width() - 1; |
SkFractionalInt fx; |
{ |
- SkPoint pt; |
- s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf, |
- SkIntToScalar(y) + SK_ScalarHalf, &pt); |
- fx = SkScalarToFractionalInt(pt.fY); |
+ const SkBitmapProcStateAutoMapper mapper(s, x, y); |
const unsigned maxY = s.fPixmap.height() - 1; |
- *xy++ = TILEY_PROCF(SkFractionalIntToFixed(fx), maxY); |
- fx = SkScalarToFractionalInt(pt.fX); |
+ *xy++ = TILEY_PROCF(SkFractionalIntToFixed(mapper.y()), maxY); |
+ fx = mapper.x(); |
} |
if (0 == maxX) { |
@@ -118,13 +115,10 @@ static void AFFINE_NOFILTER_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); |
- SkFractionalInt fx = SkScalarToFractionalInt(srcPt.fX); |
- SkFractionalInt fy = SkScalarToFractionalInt(srcPt.fY); |
+ SkFractionalInt fx = mapper.x(); |
+ SkFractionalInt fy = mapper.y(); |
SkFractionalInt dx = s.fInvSxFractionalInt; |
SkFractionalInt dy = s.fInvKyFractionalInt; |
int maxX = s.fPixmap.width() - 1; |