aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkEmptyShader.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-04-16 07:59:12 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-16 07:59:12 -0700
commit6ef68ab2cd0597a6f1141b686f82f64ac1e89ccf (patch)
tree5b027b440cb3b594f0266b977ba4e993cfaf4c4f /src/core/SkEmptyShader.h
parent6318016469a832b1b40cf1d443fd8396854f75c5 (diff)
Don't serialize anything for SkEmptyShader.
Diffstat (limited to 'src/core/SkEmptyShader.h')
-rw-r--r--src/core/SkEmptyShader.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/SkEmptyShader.h b/src/core/SkEmptyShader.h
index 8809d5f958..7b87c284f7 100644
--- a/src/core/SkEmptyShader.h
+++ b/src/core/SkEmptyShader.h
@@ -34,6 +34,12 @@ protected:
return NULL;
}
+ void flatten(SkWriteBuffer& buffer) const override {
+ // Do nothing.
+ // We just don't want to fall through to SkShader::flatten(),
+ // which will write data we don't care to serialize or decode.
+ }
+
private:
typedef SkShader INHERITED;
};