Index: src/core/SkBitmapProcState.cpp |
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp |
index 487bd80402609f454b894e5e124eb5d8eb20c9eb..9c58cc14414407487bc777d07bda6d88ae3eb3c3 100644 |
--- a/src/core/SkBitmapProcState.cpp |
+++ b/src/core/SkBitmapProcState.cpp |
@@ -820,15 +820,10 @@ void Clamp_S32_opaque_D32_nofilter_DX_shaderproc(const SkBitmapProcState& s, in |
SkFractionalInt fx; |
int dstY; |
{ |
- SkPoint pt; |
- s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf, SkIntToScalar(y) + SK_ScalarHalf, |
- &pt); |
- fx = SkScalarToFractionalInt(pt.fY) |
- + bitmap_sampler_inv_bias(s.fInvMatrix.getScaleY()); |
+ const SkBitmapProcStateAutoMapper mapper(s, x, y); |
const unsigned maxY = s.fPixmap.height() - 1; |
- dstY = SkClampMax(SkFractionalIntToInt(fx), maxY); |
- fx = SkScalarToFractionalInt(pt.fX) |
- + bitmap_sampler_inv_bias(s.fInvMatrix.getScaleX()); |
+ dstY = SkClampMax(SkFractionalIntToInt(mapper.y()), maxY); |
+ fx = mapper.x(); |
} |
const SkPMColor* SK_RESTRICT src = s.fPixmap.addr32(0, dstY); |