diff options
author | 2014-09-16 10:32:43 -0700 | |
---|---|---|
committer | 2014-09-16 10:32:43 -0700 | |
commit | 4815fe5a0a497b676677fb4e4a0f05c511855490 (patch) | |
tree | 2c7a2867039516613d8b4b4c32918e3f92041a09 /src/core/SkRecordDraw.cpp | |
parent | e1daac9b2671d723ee26c0fc6e7e54f42d423c6b (diff) |
Fix bug in layer hoisting transition to SkRecord backend
Care must be taken when setting up the initial CTM matrix for partial SkRecord playbacks b.c. all the setMatrix calls will concatenate with the initial matrix (which may be different then the CTM that is required to draw correctly).
R=mtklein@google.com, bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/549143003
Diffstat (limited to 'src/core/SkRecordDraw.cpp')
-rw-r--r-- | src/core/SkRecordDraw.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp index e1975e1fe3..8bd12d00c8 100644 --- a/src/core/SkRecordDraw.cpp +++ b/src/core/SkRecordDraw.cpp @@ -48,11 +48,12 @@ void SkRecordDraw(const SkRecord& record, void SkRecordPartialDraw(const SkRecord& record, SkCanvas* canvas, const SkRect& clearRect, - unsigned start, unsigned stop) { + unsigned start, unsigned stop, + const SkMatrix& initialCTM) { SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/); stop = SkTMin(stop, record.count()); - SkRecords::PartialDraw draw(canvas, clearRect); + SkRecords::PartialDraw draw(canvas, clearRect, initialCTM); for (unsigned i = start; i < stop; i++) { record.visit<void>(i, draw); } |