Index: src/effects/SkPerlinNoiseShader.cpp |
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp |
index 989bdd143d051b4b88e70cc22ad6e1c0144e0fcd..501e6361a53f0e2d1c6ede31b37dde9cc397e58c 100644 |
--- a/src/effects/SkPerlinNoiseShader.cpp |
+++ b/src/effects/SkPerlinNoiseShader.cpp |
@@ -489,10 +489,11 @@ public: |
virtual void emitCode(EmitArgs&) override; |
- void setData(const GrGLProgramDataManager&, const GrProcessor&) override; |
- |
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b); |
+protected: |
+ void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override; |
+ |
private: |
GrGLProgramDataManager::UniformHandle fStitchDataUni; |
@@ -527,10 +528,6 @@ public: |
const char* name() const override { return "PerlinNoise"; } |
- GrGLFragmentProcessor* createGLInstance() const override { |
- return SkNEW_ARGS(GrGLPerlinNoise, (*this)); |
- } |
- |
const SkPerlinNoiseShader::StitchData& stitchData() const { return fPaintingData->fStitchDataInit; } |
SkPerlinNoiseShader::Type type() const { return fType; } |
@@ -541,6 +538,10 @@ public: |
uint8_t alpha() const { return fAlpha; } |
private: |
+ GrGLFragmentProcessor* onCreateGLInstance() const override { |
+ return SkNEW_ARGS(GrGLPerlinNoise, (*this)); |
+ } |
+ |
virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, |
GrProcessorKeyBuilder* b) const override { |
GrGLPerlinNoise::GenKey(*this, caps, b); |
@@ -916,8 +917,8 @@ void GrGLPerlinNoise::GenKey(const GrProcessor& processor, const GrGLSLCaps&, |
b->add32(key); |
} |
-void GrGLPerlinNoise::setData(const GrGLProgramDataManager& pdman, const GrProcessor& processor) { |
- INHERITED::setData(pdman, processor); |
+void GrGLPerlinNoise::onSetData(const GrGLProgramDataManager& pdman, const GrProcessor& processor) { |
+ INHERITED::onSetData(pdman, processor); |
const GrPerlinNoiseEffect& turbulence = processor.cast<GrPerlinNoiseEffect>(); |