Start tracking the CTM while filling the BBH in SkRecordDraw.
Depends on https://codereview.chromium.org/475473002/
BUG=skia:
R=robertphillips@google.com, reed@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/468193003
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 327a97a..53522c2 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -229,9 +229,9 @@
return SkCanvas::kNoLayer_SaveLayerStrategy;
}
-void SkRecorder::willRestore() {
- APPEND(Restore);
- INHERITED(willRestore);
+void SkRecorder::didRestore() {
+ APPEND(Restore, this->getTotalMatrix());
+ INHERITED(didRestore);
}
void SkRecorder::onPushCull(const SkRect& rect) {
@@ -248,6 +248,7 @@
}
void SkRecorder::didSetMatrix(const SkMatrix& matrix) {
+ SkASSERT(matrix == this->getTotalMatrix());
APPEND(SetMatrix, matrix);
INHERITED(didSetMatrix, matrix);
}