Index: src/record/SkRecordDraw.cpp |
diff --git a/src/record/SkRecordDraw.cpp b/src/record/SkRecordDraw.cpp |
index 324946e5d7a218364d3305b46606e5db652f01a3..5df1650a5e9ba09924a283ffc1ad112225c92f83 100644 |
--- a/src/record/SkRecordDraw.cpp |
+++ b/src/record/SkRecordDraw.cpp |
@@ -38,7 +38,13 @@ DRAW(PopCull, popCull()); |
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)); |