Index: src/core/SkLightingShader.cpp |
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp |
index 02f75f351656e49fb20bada69a98a7acbc49ad76..c8a5a2b7372957a1dabf14dce67c523e53fd2e94 100644 |
--- a/src/core/SkLightingShader.cpp |
+++ b/src/core/SkLightingShader.cpp |
@@ -79,6 +79,8 @@ |
SkFilterQuality) const override; |
#endif |
+ size_t contextSize(const ContextRec&) const override; |
+ |
class LightingShaderContext : public SkShader::Context { |
public: |
// The context takes ownership of the states. It will call their destructors |
@@ -104,7 +106,6 @@ |
protected: |
void flatten(SkWriteBuffer&) const override; |
- size_t onContextSize(const ContextRec&) const override; |
Context* onCreateContext(const ContextRec&, void*) const override; |
bool computeNormTotalInverse(const ContextRec& rec, SkMatrix* normTotalInverse) const; |
@@ -415,6 +416,10 @@ |
return fDiffuseMap.isOpaque(); |
} |
+size_t SkLightingShaderImpl::contextSize(const ContextRec&) const { |
+ return 2 * sizeof(SkBitmapProcState) + sizeof(LightingShaderContext); |
+} |
+ |
SkLightingShaderImpl::LightingShaderContext::LightingShaderContext(const SkLightingShaderImpl& shader, |
const ContextRec& rec, |
SkBitmapProcState* diffuseState, |
@@ -650,10 +655,6 @@ |
return m->invert(normTotalInverse); |
} |
-size_t SkLightingShaderImpl::onContextSize(const ContextRec&) const { |
- return 2 * sizeof(SkBitmapProcState) + sizeof(LightingShaderContext); |
-} |
- |
SkShader::Context* SkLightingShaderImpl::onCreateContext(const ContextRec& rec, |
void* storage) const { |