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

Unified Diff: src/effects/SkColorCubeFilter.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/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorCubeFilter.cpp
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index 3b7c75fa7f5990c320dc0c45c177bba1cc79758c..62a122f3ff6777f4733f0deb754a6d9f58d41351 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -194,7 +194,6 @@ public:
const char* name() const override { return "ColorCube"; }
- GrGLFragmentProcessor* createGLInstance() const override;
int colorCubeSize() const { return fColorCubeAccess.getTexture()->width(); }
@@ -209,7 +208,8 @@ public:
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
- void setData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ protected:
+ void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
private:
GrGLProgramDataManager::UniformHandle fColorCubeSizeUni;
@@ -222,6 +222,8 @@ private:
virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const override;
+ GrGLFragmentProcessor* onCreateGLInstance() const override;
+
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
GrColorCubeEffect(GrTexture* colorCube);
@@ -246,7 +248,7 @@ void GrColorCubeEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorK
GLProcessor::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrColorCubeEffect::createGLInstance() const {
+GrGLFragmentProcessor* GrColorCubeEffect::onCreateGLInstance() const {
return SkNEW_ARGS(GLProcessor, (*this));
}
@@ -315,7 +317,7 @@ void GrColorCubeEffect::GLProcessor::emitCode(EmitArgs& args) {
cubeIdx, nonZeroAlpha, args.fInputColor);
}
-void GrColorCubeEffect::GLProcessor::setData(const GrGLProgramDataManager& pdman,
+void GrColorCubeEffect::GLProcessor::onSetData(const GrGLProgramDataManager& pdman,
const GrProcessor& proc) {
const GrColorCubeEffect& colorCube = proc.cast<GrColorCubeEffect>();
SkScalar size = SkIntToScalar(colorCube.colorCubeSize());
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698