Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Unified Diff: src/core/SkCanvas.cpp

Issue 2264433002: Revert of Fast path translate() in SkCanvas and SkLiteDL. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkLiteDL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 3e349ea64d368f9360bb355190ffffea7a0f1005..551ca60742b3a6e280306bf92b8998d1e84c3251 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1444,14 +1444,9 @@
/////////////////////////////////////////////////////////////////////////////
void SkCanvas::translate(SkScalar dx, SkScalar dy) {
- 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);
+ SkMatrix m;
+ m.setTranslate(dx, dy);
+ this->concat(m);
}
void SkCanvas::scale(SkScalar sx, SkScalar sy) {
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkLiteDL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698