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

Unified Diff: src/effects/SkMorphologyImageFilter.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/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 163f9d975a76a8dccf0ea637fb661c9979a120af..01e978e846369108f2cc274dddee8f662bbd745b 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -224,8 +224,6 @@ public:
const char* name() const override { return "Morphology"; }
- GrGLFragmentProcessor* createGLInstance() const override;
-
protected:
MorphologyType fType;
@@ -233,6 +231,8 @@ protected:
float fRange[2];
private:
+ GrGLFragmentProcessor* onCreateGLInstance() const override;
+
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
@@ -258,7 +258,8 @@ public:
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b);
- void setData(const GrGLProgramDataManager&, const GrProcessor&) override;
+protected:
+ void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
private:
int width() const { return GrMorphologyEffect::WidthFromRadius(fRadius); }
@@ -359,7 +360,7 @@ void GrGLMorphologyEffect::GenKey(const GrProcessor& proc,
b->add32(key);
}
-void GrGLMorphologyEffect::setData(const GrGLProgramDataManager& pdman,
+void GrGLMorphologyEffect::onSetData(const GrGLProgramDataManager& pdman,
const GrProcessor& proc) {
const GrMorphologyEffect& m = proc.cast<GrMorphologyEffect>();
GrTexture& texture = *m.texture(0);
@@ -423,7 +424,7 @@ void GrMorphologyEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessor
GrGLMorphologyEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrMorphologyEffect::createGLInstance() const {
+GrGLFragmentProcessor* GrMorphologyEffect::onCreateGLInstance() const {
return SkNEW_ARGS(GrGLMorphologyEffect, (*this));
}
bool GrMorphologyEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
« no previous file with comments | « src/effects/SkMagnifierImageFilter.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698