Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: src/effects/SkColorMatrixFilter.cpp

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/effects/SkColorFilters.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698