Index: src/effects/SkColorMatrixFilter.cpp |
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp |
index 0f90349b2bdcb9c4b0706eb0a9ea6b15e8af04ec..5845bc9ded6fd6c993444db1e88685e1fd7b8b75 100644 |
--- a/src/effects/SkColorMatrixFilter.cpp |
+++ b/src/effects/SkColorMatrixFilter.cpp |
@@ -394,11 +394,6 @@ public: |
const char* name() const override { return "Color Matrix"; } |
- GrGLFragmentProcessor* createGLInstance() const override { |
- return SkNEW_ARGS(GLProcessor, (*this)); |
- } |
- |
- |
GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
class GLProcessor : public GrGLFragmentProcessor { |
@@ -435,7 +430,8 @@ public: |
fsBuilder->codeAppendf("\t%s.rgb *= %s.a;\n", args.fOutputColor, args.fOutputColor); |
} |
- virtual void setData(const GrGLProgramDataManager& uniManager, |
+ protected: |
+ virtual void onSetData(const GrGLProgramDataManager& uniManager, |
const GrProcessor& proc) override { |
const ColorMatrixEffect& cme = proc.cast<ColorMatrixEffect>(); |
const float* m = cme.fMatrix.fMat; |
@@ -466,6 +462,10 @@ private: |
this->initClassID<ColorMatrixEffect>(); |
} |
+ GrGLFragmentProcessor* onCreateGLInstance() const override { |
+ return SkNEW_ARGS(GLProcessor, (*this)); |
+ } |
+ |
virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, |
GrProcessorKeyBuilder* b) const override { |
GLProcessor::GenKey(*this, caps, b); |