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

Unified Diff: src/effects/SkColorFilters.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/SkColorCubeFilter.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilters.cpp
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index bda3d9ad880f283e4b3ae89be78d6e08bb470da6..af3e38b02ae301610ca390aa6b52d0a042a548f9 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -147,10 +147,6 @@ public:
return true;
}
- GrGLFragmentProcessor* createGLInstance() const override {
- return SkNEW_ARGS(GLProcessor, (*this));
- }
-
const char* name() const override { return "ModeColorFilterEffect"; }
SkXfermode::Mode mode() const { return fMode; }
@@ -190,7 +186,8 @@ public:
b->add32(colorModeFilter.mode());
}
- virtual void setData(const GrGLProgramDataManager& pdman,
+ protected:
+ virtual void onSetData(const GrGLProgramDataManager& pdman,
const GrProcessor& fp) override {
if (fFilterColorUni.isValid()) {
const ModeColorFilterEffect& colorModeFilter = fp.cast<ModeColorFilterEffect>();
@@ -215,6 +212,10 @@ private:
this->initClassID<ModeColorFilterEffect>();
}
+ 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/SkColorCubeFilter.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698