Index: src/core/SkComposeShader.cpp |
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp |
index 3c6623d29128e2be3b16fb9cfbc1f65df7b9ad32..3c5b55aae663e948e0c740d4dbcde3b9948d790a 100644 |
--- a/src/core/SkComposeShader.cpp |
+++ b/src/core/SkComposeShader.cpp |
@@ -25,6 +25,20 @@ |
fMode = mode; |
SkSafeRef(mode); |
} |
+ |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+SkComposeShader::SkComposeShader(SkReadBuffer& buffer) : INHERITED(buffer) { |
+ fShaderA = buffer.readShader(); |
+ if (NULL == fShaderA) { |
+ fShaderA = SkNEW_ARGS(SkColorShader, ((SkColor)0)); |
+ } |
+ fShaderB = buffer.readShader(); |
+ if (NULL == fShaderB) { |
+ fShaderB = SkNEW_ARGS(SkColorShader, ((SkColor)0)); |
+ } |
+ fMode = buffer.readXfermode(); |
+} |
+#endif |
SkComposeShader::~SkComposeShader() { |
SkSafeUnref(fMode); |