Index: src/effects/SkMorphologyImageFilter.cpp |
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp |
index 67769f29b93c2efe2468071133ec7ceb7212e0ca..bb8478c907b4865a417146e118bc4509338bbd5d 100644 |
--- a/src/effects/SkMorphologyImageFilter.cpp |
+++ b/src/effects/SkMorphologyImageFilter.cpp |
@@ -21,6 +21,7 @@ |
#include "effects/Gr1DKernelEffect.h" |
#endif |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
SkMorphologyImageFilter::SkMorphologyImageFilter(SkReadBuffer& buffer) |
: INHERITED(1, buffer) { |
fRadius.fWidth = buffer.readInt(); |
@@ -28,6 +29,7 @@ SkMorphologyImageFilter::SkMorphologyImageFilter(SkReadBuffer& buffer) |
buffer.validate((fRadius.fWidth >= 0) && |
(fRadius.fHeight >= 0)); |
} |
+#endif |
SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, |
int radiusY, |
@@ -36,7 +38,6 @@ SkMorphologyImageFilter::SkMorphologyImageFilter(int radiusX, |
: INHERITED(1, &input, cropRect), fRadius(SkISize::Make(radiusX, radiusY)) { |
} |
- |
void SkMorphologyImageFilter::flatten(SkWriteBuffer& buffer) const { |
this->INHERITED::flatten(buffer); |
buffer.writeInt(fRadius.fWidth); |
@@ -258,6 +259,20 @@ bool SkMorphologyImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& |
return true; |
} |
+SkFlattenable* SkErodeImageFilter::CreateProc(SkReadBuffer& buffer) { |
+ SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); |
+ const int width = buffer.readInt(); |
+ const int height = buffer.readInt(); |
+ return Create(width, height, common.getInput(0), &common.cropRect()); |
+} |
+ |
+SkFlattenable* SkDilateImageFilter::CreateProc(SkReadBuffer& buffer) { |
+ SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); |
+ const int width = buffer.readInt(); |
+ const int height = buffer.readInt(); |
+ return Create(width, height, common.getInput(0), &common.cropRect()); |
+} |
+ |
#if SK_SUPPORT_GPU |
/////////////////////////////////////////////////////////////////////////////// |