Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: src/core/SkBlitter.cpp

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkComposeShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkComposeShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698