Index: src/effects/SkMatrixImageFilter.cpp |
diff --git a/src/effects/SkMatrixImageFilter.cpp b/src/effects/SkMatrixImageFilter.cpp |
index c7c815a761dec37b3acb782bba71220ee4a69352..2b7786a2b542262915581d6906ff9e12c8878375 100644 |
--- a/src/effects/SkMatrixImageFilter.cpp |
+++ b/src/effects/SkMatrixImageFilter.cpp |
@@ -29,11 +29,21 @@ SkMatrixImageFilter* SkMatrixImageFilter::Create(const SkMatrix& transform, |
return SkNEW_ARGS(SkMatrixImageFilter, (transform, filterLevel, input)); |
} |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
SkMatrixImageFilter::SkMatrixImageFilter(SkReadBuffer& buffer) |
: INHERITED(1, buffer) { |
buffer.readMatrix(&fTransform); |
fFilterLevel = static_cast<SkPaint::FilterLevel>(buffer.readInt()); |
} |
+#endif |
+ |
+SkFlattenable* SkMatrixImageFilter::CreateProc(SkReadBuffer& buffer) { |
+ SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); |
+ SkMatrix matrix; |
+ buffer.readMatrix(&matrix); |
+ SkPaint::FilterLevel level = static_cast<SkPaint::FilterLevel>(buffer.readInt()); |
+ return Create(matrix, level, common.getInput(0)); |
+} |
void SkMatrixImageFilter::flatten(SkWriteBuffer& buffer) const { |
this->INHERITED::flatten(buffer); |