Index: src/core/SkShader.cpp |
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp |
index 816d6fd3298c0142cd9102d056961adcc11692cd..39e8ed35f5cd516185ef8c6f85cebbb99d4bc6c4 100644 |
--- a/src/core/SkShader.cpp |
+++ b/src/core/SkShader.cpp |
@@ -45,6 +45,17 @@ |
fLocalMatrix.reset(); |
} |
} |
+ |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+SkShader::SkShader(SkReadBuffer& buffer) : INHERITED(buffer) { |
+ inc_shader_counter(); |
+ if (buffer.readBool()) { |
+ buffer.readMatrix(&fLocalMatrix); |
+ } else { |
+ fLocalMatrix.reset(); |
+ } |
+} |
+#endif |
SkShader::~SkShader() { |
dec_shader_counter(); |
@@ -260,6 +271,12 @@ |
return SkColorGetA(fColor) == 255; |
} |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+SkColorShader::SkColorShader(SkReadBuffer& b) : INHERITED(b) { |
+ fColor = b.readColor(); |
+} |
+#endif |
+ |
SkFlattenable* SkColorShader::CreateProc(SkReadBuffer& buffer) { |
return SkNEW_ARGS(SkColorShader, (buffer.readColor())); |
} |