Index: src/core/SkPicturePlayback.cpp |
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp |
index 82b8f0e5782ef6ac494e124952f46719448c98cd..4b028f714e91da5d2c96a108fd177c4afedab023 100644 |
--- a/src/core/SkPicturePlayback.cpp |
+++ b/src/core/SkPicturePlayback.cpp |
@@ -483,11 +483,29 @@ void SkPicturePlayback::handleOp(SkReader32* reader, |
auto flags = SkCanvas::LegacySaveFlagsToSaveLayerFlags(reader->readInt()); |
canvas->saveLayer(SkCanvas::SaveLayerRec(boundsPtr, paint, flags)); |
} break; |
- case SAVE_LAYER_SAVELAYERFLAGS: { |
+ case SAVE_LAYER_SAVELAYERFLAGS_DEPRECATED_JAN_2016: { |
const SkRect* boundsPtr = get_rect_ptr(reader); |
const SkPaint* paint = fPictureData->getPaint(reader); |
canvas->saveLayer(SkCanvas::SaveLayerRec(boundsPtr, paint, reader->readInt())); |
} break; |
+ case SAVE_LAYER_SAVELAYERREC: { |
+ SkCanvas::SaveLayerRec rec(nullptr, nullptr, nullptr, 0); |
+ const uint32_t flatFlags = reader->readInt(); |
+ if (flatFlags & SAVELAYERREC_HAS_BOUNDS) { |
+ rec.fBounds = &reader->skipT<SkRect>(); |
+ } |
+ if (flatFlags & SAVELAYERREC_HAS_PAINT) { |
+ rec.fPaint = fPictureData->getPaint(reader); |
+ } |
+ if (flatFlags & SAVELAYERREC_HAS_BACKDROP) { |
+ const SkPaint* paint = fPictureData->getPaint(reader); |
+ rec.fBackdrop = paint->getImageFilter(); |
+ } |
+ if (flatFlags & SAVELAYERREC_HAS_FLAGS) { |
+ rec.fSaveLayerFlags = reader->readInt(); |
+ } |
+ canvas->saveLayer(rec); |
+ } break; |
case SCALE: { |
SkScalar sx = reader->readScalar(); |
SkScalar sy = reader->readScalar(); |