Index: src/core/SkEmptyShader.h |
diff --git a/src/core/SkEmptyShader.h b/src/core/SkEmptyShader.h |
index 42b61c52feffa9478817fe9edd212eb5a281d2da..c1713d1a2ee91e7a4bbabcaed144589911d4c204 100644 |
--- a/src/core/SkEmptyShader.h |
+++ b/src/core/SkEmptyShader.h |
@@ -20,16 +20,16 @@ |
public: |
SkEmptyShader() {} |
+ size_t contextSize(const ContextRec&) const override { |
+ // Even though createContext returns nullptr we have to return a value of at least |
+ // sizeof(SkShader::Context) to satisfy SkSmallAllocator. |
+ return sizeof(SkShader::Context); |
+ } |
+ |
SK_TO_STRING_OVERRIDE() |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader) |
protected: |
- size_t onContextSize(const ContextRec&) const override { |
- // Even though createContext returns nullptr we have to return a value of at least |
- // sizeof(SkShader::Context) to satisfy SkSmallAllocator. |
- return SkAlign16(sizeof(SkShader::Context)); |
- } |
- |
SkShader::Context* onCreateContext(const ContextRec&, void*) const override { |
return nullptr; |
} |