aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureRecord.cpp
diff options
context:
space:
mode:
authorGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 17:47:34 +0000
committerGravatar junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 17:47:34 +0000
commita6c9e0e02be390d36b80f4872c628edb3594208e (patch)
treebe0b06be5e8f496fa93848db891889afb9ae99a3 /src/core/SkPictureRecord.cpp
parentd0c1a06cb98dd4a009dfa79e37ba6ca23a8c180b (diff)
Cleanup restore offsets at end of SkPicture recording
Review URL: http://codereview.appspot.com/6355099/ TEST=skia unit test CanvasTest, test step TwoClipOps BUG=https://code.google.com/p/chromium/issues/detail?id=133432 git-svn-id: http://skia.googlecode.com/svn/trunk@4577 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPictureRecord.cpp')
-rw-r--r--src/core/SkPictureRecord.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index f961bc4c62..630a1bb649 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -170,6 +170,14 @@ void SkPictureRecord::fillRestoreOffsetPlaceholdersForCurrentStackLevel(
}
}
+void SkPictureRecord::endRecording() {
+ // clear any remaining unhandled restore offset placeholders
+ while (fRestoreOffsetStack.count()) {
+ this->fillRestoreOffsetPlaceholdersForCurrentStackLevel(0);
+ fRestoreOffsetStack.pop();
+ }
+}
+
void SkPictureRecord::recordRestoreOffsetPlaceholder(SkRegion::Op op) {
if (regionOpExpands(op)) {
// Run back through any previous clip ops, and mark their offset to