diff options
author | 2016-03-03 13:25:25 -0800 | |
---|---|---|
committer | 2016-03-03 13:25:25 -0800 | |
commit | d812fb458807245daa812adb7af0733cf5b54d96 (patch) | |
tree | 8a25dc8ae4bc984c78bb0a730b17130f5396d9cc /src/core/SkColorShader.h | |
parent | e79586bf82997477b8bc95469147cd25a8e22ff0 (diff) |
enforce 16byte alignment in shader contexts
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1759653004
Review URL: https://codereview.chromium.org/1759653004
Diffstat (limited to 'src/core/SkColorShader.h')
-rw-r--r-- | src/core/SkColorShader.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/SkColorShader.h b/src/core/SkColorShader.h index 6e4e42ad95..00a2bb61f0 100644 --- a/src/core/SkColorShader.h +++ b/src/core/SkColorShader.h @@ -26,10 +26,6 @@ public: bool isOpaque() const override; - size_t contextSize(const ContextRec&) const override { - return sizeof(ColorShaderContext); - } - class ColorShaderContext : public SkShader::Context { public: ColorShaderContext(const SkColorShader& shader, const ContextRec&); @@ -61,6 +57,9 @@ protected: SkColorShader(SkReadBuffer&); void flatten(SkWriteBuffer&) const override; Context* onCreateContext(const ContextRec&, void* storage) const override; + size_t onContextSize(const ContextRec&) const override { + return sizeof(ColorShaderContext); + } bool onAsLuminanceColor(SkColor* lum) const override { *lum = fColor; return true; |