Index: src/effects/SkLayerRasterizer.cpp |
diff --git a/src/effects/SkLayerRasterizer.cpp b/src/effects/SkLayerRasterizer.cpp |
index 9b7bdca3f4b7fb198ff0d4ec1949144d17aac055..b331a0363df90bcabed0bc47abb124157e8f3cae 100644 |
--- a/src/effects/SkLayerRasterizer.cpp |
+++ b/src/effects/SkLayerRasterizer.cpp |
@@ -148,12 +148,18 @@ bool SkLayerRasterizer::onRasterize(const SkPath& path, const SkMatrix& matrix, |
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(); |