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.h b/src/record/SkRecordDraw.h
index 4ec6e68..359679a 100644
--- a/src/record/SkRecordDraw.h
+++ b/src/record/SkRecordDraw.h
@@ -19,7 +19,8 @@
// This is an SkRecord visitor that will draw that SkRecord to an SkCanvas.
class Draw : SkNoncopyable {
public:
- explicit Draw(SkCanvas* canvas) : fCanvas(canvas), fIndex(0) {}
+ explicit Draw(SkCanvas* canvas)
+ : fInitialCTM(canvas->getTotalMatrix()), fCanvas(canvas), fIndex(0) {}
unsigned index() const { return fIndex; }
void next() { ++fIndex; }
@@ -44,6 +45,7 @@
bool skip(const PairedPushCull&);
bool skip(const BoundedDrawPosTextH&);
+ const SkMatrix fInitialCTM;
SkCanvas* fCanvas;
unsigned fIndex;
};