Index: src/effects/SkLayerRasterizer.cpp |
diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp |
index d3e112c3a4b836118be46258c5f3d1b9fb181ab3..b331a0363df90bcabed0bc47abb124157e8f3cae 100644 |
--- a/src/effects/SkLayerRasterizer.cpp |
+++ b/src/effects/SkLayerRasterizer.cpp |
@@ -148,13 +148,18 @@ |
return true; |
} |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+SkLayerRasterizer::SkLayerRasterizer(SkReadBuffer& buffer) |
+ : SkRasterizer(buffer), fLayers(ReadLayers(buffer)) {} |
+#endif |
+ |
SkFlattenable* SkLayerRasterizer::CreateProc(SkReadBuffer& buffer) { |
return SkNEW_ARGS(SkLayerRasterizer, (ReadLayers(buffer))); |
} |
SkDeque* SkLayerRasterizer::ReadLayers(SkReadBuffer& buffer) { |
int count = buffer.readInt(); |
- |
+ |
SkDeque* layers = SkNEW_ARGS(SkDeque, (sizeof(SkLayerRasterizer_Rec))); |
for (int i = 0; i < count; i++) { |
SkLayerRasterizer_Rec* rec = (SkLayerRasterizer_Rec*)layers->push_back(); |