Index: src/effects/SkRectShaderImageFilter.cpp |
diff --git a/src/effects/SkRectShaderImageFilter.cpp b/src/effects/SkRectShaderImageFilter.cpp |
index 6961facc10b4ef359ca1ccb0eba958b8b01a21c7..fe0be12e615c852393a981340d519ec7e42142e4 100644 |
--- a/src/effects/SkRectShaderImageFilter.cpp |
+++ b/src/effects/SkRectShaderImageFilter.cpp |
@@ -35,14 +35,20 @@ SkRectShaderImageFilter::SkRectShaderImageFilter(SkShader* s, const CropRect* cr |
s->ref(); |
} |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
SkRectShaderImageFilter::SkRectShaderImageFilter(SkReadBuffer& buffer) |
: INHERITED(0, buffer) { |
fShader = buffer.readShader(); |
} |
+#endif |
+ |
+SkFlattenable* SkRectShaderImageFilter::CreateProc(SkReadBuffer& buffer) { |
+ SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 0); |
+ return Create(buffer.readShader(), &common.cropRect()); |
+} |
void SkRectShaderImageFilter::flatten(SkWriteBuffer& buffer) const { |
this->INHERITED::flatten(buffer); |
- |
buffer.writeFlattenable(fShader); |
} |