| Index: src/core/SkBitmapProcState_matrix.h
|
| diff --git a/src/core/SkBitmapProcState_matrix.h b/src/core/SkBitmapProcState_matrix.h
|
| index bdab846496c82d8b30aed4295052e219932b8400..273a35ba89eea20bf97afa0b69912ed515700d08 100644
|
| --- a/src/core/SkBitmapProcState_matrix.h
|
| +++ b/src/core/SkBitmapProcState_matrix.h
|
| @@ -61,15 +61,13 @@ 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
|
| @@ -95,15 +93,12 @@ 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;
|
|
|