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). |