Index: src/core/SkBitmapProcState.cpp |
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp |
index b1438cb8a0400fadbddcaed31cadb70e0fe21966..d097d8ea2edefa21e053411c22caaec5f7688140 100644 |
--- a/src/core/SkBitmapProcState.cpp |
+++ b/src/core/SkBitmapProcState.cpp |
@@ -173,9 +173,13 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { |
if (fInvMatrix.invert(&forward)) { |
if (clampClamp ? just_trans_clamp(forward, fPixmap) |
: just_trans_general(forward)) { |
+#ifdef SK_SUPPORT_LEGACY_TRANSLATEROUNDHACK |
SkScalar tx = -SkScalarRoundToScalar(forward.getTranslateX()); |
SkScalar ty = -SkScalarRoundToScalar(forward.getTranslateY()); |
fInvMatrix.setTranslate(tx, ty); |
+#else |
+ fInvMatrix.setTranslate(-forward.getTranslateX(), -forward.getTranslateY()); |
+#endif |
} |
} |
} |