Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: src/core/SkPictureRecord.cpp

Issue 22875008: Prevent picture recording from over optimizing the culling of clips. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: attempt to fix mismatch Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« gm/canvasstate.cpp ('K') | « gyp/gmslides.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 915736373d0aba5df1ac3116a09607984a006811..ec8012334ce8f5a59e687582692ca56dec7b12fd 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -479,6 +479,13 @@ static bool collapse_save_clip_restore(SkWriter32* writer, int32_t offset,
return false;
}
SkASSERT(SAVE == op);
robertphillips 2013/08/13 12:12:32 Add a kSaveSize near the kSaveLayerNoBoundsSize gl
+ SkASSERT(8 == opSize);
+
+ // get the save flag (last 4-bytes of the space allocated for the opSize)
+ SkCanvas::SaveFlags saveFlag = (SkCanvas::SaveFlags) *writer->peek32(offset+4);
robertphillips 2013/08/13 12:12:32 Is the evil combo we see everywhere a MatrixClip s
djsollen 2013/08/13 13:24:45 Chrome doesn't do selective save and restores like
+ if (SkCanvas::kMatrixClip_SaveFlag != (SkCanvas::kMatrixClip_SaveFlag & saveFlag)) {
robertphillips 2013/08/13 12:12:32 // The following code is only correct for kMatrixC
+ return false;
+ }
// Walk forward until we get back to either a draw-verb (abort) or we hit
// our restore (success).
« gm/canvasstate.cpp ('K') | « gyp/gmslides.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698