Index: src/core/SkBlitter.cpp |
diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp |
index cb84ec7d9db0aaa75f8539f7789fba8a5090bc70..b2da6aec6a9fa4c0175a37aab4f91400407bed86 100644 |
--- a/src/core/SkBlitter.cpp |
+++ b/src/core/SkBlitter.cpp |
@@ -714,19 +714,17 @@ public: |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Sk3DShader) |
protected: |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
Sk3DShader(SkReadBuffer& buffer) : INHERITED(buffer) { |
fProxy = buffer.readShader(); |
// Leaving this here until we bump the picture version, though this |
// shader should never be recorded. |
buffer.readColor(); |
} |
+#endif |
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { |
- this->INHERITED::flatten(buffer); |
buffer.writeFlattenable(fProxy); |
- // Leaving this here until we bump the picture version, though this |
- // shader should never be recorded. |
- buffer.writeColor(SkColor()); |
} |
private: |
@@ -735,6 +733,11 @@ private: |
typedef SkShader INHERITED; |
}; |
+SkFlattenable* Sk3DShader::CreateProc(SkReadBuffer& buffer) { |
+ SkAutoTUnref<SkShader> shader(buffer.readShader()); |
+ return SkNEW_ARGS(Sk3DShader, (shader)); |
+} |
+ |
class Sk3DBlitter : public SkBlitter { |
public: |
Sk3DBlitter(SkBlitter* proxy, Sk3DShader::Sk3DShaderContext* shaderContext) |