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

Unified Diff: src/effects/SkTableColorFilter.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/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index d74337250ab8c71d78654c2f41fb840c8ae0d1e3..f39e88a366129ca014f89f5757b27d3e3c335afc 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -348,12 +348,12 @@ public:
const char* name() const override { return "ColorTable"; }
- GrGLFragmentProcessor* createGLInstance() const override;
-
const GrTextureStripAtlas* atlas() const { return fAtlas; }
int atlasRow() const { return fRow; }
private:
+ GrGLFragmentProcessor* onCreateGLInstance() const override;
+
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
@@ -381,10 +381,11 @@ public:
virtual void emitCode(EmitArgs&) override;
- void setData(const GrGLProgramDataManager&, const GrProcessor&) override;
-
static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b) {}
+protected:
+ void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+
private:
UniformHandle fRGBAYValuesUni;
typedef GrGLFragmentProcessor INHERITED;
@@ -393,7 +394,7 @@ private:
GLColorTableEffect::GLColorTableEffect(const GrProcessor&) {
}
-void GLColorTableEffect::setData(const GrGLProgramDataManager& pdm, const GrProcessor& proc) {
+void GLColorTableEffect::onSetData(const GrGLProgramDataManager& pdm, const GrProcessor& proc) {
// The textures are organized in a strip where the rows are ordered a, r, g, b.
float rgbaYValues[4];
const ColorTableEffect& cte = proc.cast<ColorTableEffect>();
@@ -505,7 +506,7 @@ void ColorTableEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
GLColorTableEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* ColorTableEffect::createGLInstance() const {
+GrGLFragmentProcessor* ColorTableEffect::onCreateGLInstance() const {
return SkNEW_ARGS(GLColorTableEffect, (*this));
}
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkGradientShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698