Don't clobber initial transform with SetMatrix.
BUG=skia:2378
R=reed@google.com, mtklein@google.com, robertphillips@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/290883004
git-svn-id: http://skia.googlecode.com/svn/trunk@14778 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/record/SkRecordDraw.cpp b/src/record/SkRecordDraw.cpp
index 324946e..5df1650 100644
--- a/src/record/SkRecordDraw.cpp
+++ b/src/record/SkRecordDraw.cpp
@@ -38,7 +38,13 @@
DRAW(PushCull, pushCull(r.rect));
DRAW(Clear, clear(r.color));
DRAW(Concat, concat(r.matrix));
-DRAW(SetMatrix, setMatrix(r.matrix));
+
+// We can't clobber the canvas' initial CTM when calling setMatrix.
+template <> void Draw::draw(const SetMatrix& r) {
+ SkMatrix ctm;
+ ctm.setConcat(fInitialCTM, r.matrix);
+ fCanvas->setMatrix(ctm);
+}
DRAW(ClipPath, clipPath(r.path, r.op, r.doAA));
DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA));