diff options
author | halcanary <halcanary@google.com> | 2015-01-05 08:55:34 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-05 08:55:34 -0800 |
commit | 50b9307e96064637b10b6f070a807e320c45a005 (patch) | |
tree | 3b11cf64ddc5c3bc76b69d4f12ab0635a5faaad9 | |
parent | abe4baa2c3ce329048064f4de8aedf33b5c0861a (diff) |
Correctly declare skiagm::DCShader to be not flattenable.
Motivation: As part of my testing I serialize all of our GMs to SKP
files. This was breaking my code.
Review URL: https://codereview.chromium.org/832393002
-rw-r--r-- | gm/dcshader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp index 24d548d8d2..1871e4daab 100644 --- a/gm/dcshader.cpp +++ b/gm/dcshader.cpp @@ -25,7 +25,10 @@ class DCShader : public SkShader { public: DCShader(const SkMatrix& matrix) : fDeviceMatrix(matrix) {} - Factory getFactory() const SK_OVERRIDE { return NULL; } + // This is a custom shader, so we don't need to make it + // flattenable. Since this class is not part of the skia library, + // it wouldn't deserialize without linking this library anyway. + SK_DECLARE_NOT_FLATTENABLE_PROCS(DCShader) bool asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix& viewM, const SkMatrix* localMatrix, GrColor* color, |