Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 6fbc4fe709c327f21c1c70dc8f6ac27990576bb5..ca0bf3ccaf8afb4e1f6f8bf5a049b69e33a2d109 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1444,9 +1444,14 @@ void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y, const SkPa |
///////////////////////////////////////////////////////////////////////////// |
void SkCanvas::translate(SkScalar dx, SkScalar dy) { |
- SkMatrix m; |
- m.setTranslate(dx, dy); |
- this->concat(m); |
+ this->checkForDeferredSave(); |
+ fDeviceCMDirty = true; |
+ fMCRec->fMatrix.preTranslate(dx,dy); |
+ |
+ // Translate shouldn't affect the is-scale-translateness of the matrix. |
+ SkASSERT(fIsScaleTranslate == fMCRec->fMatrix.isScaleTranslate()); |
+ |
+ this->didTranslate(dx,dy); |
} |
void SkCanvas::scale(SkScalar sx, SkScalar sy) { |