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

Unified Diff: src/effects/SkAlphaThresholdFilter.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 | « include/gpu/effects/GrConstColorProcessor.h ('k') | src/effects/SkArithmeticMode_gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index fd7e5c35aef10f4b2f4d0d97910074410b3c3cdc..e55376d5218a95679a562bd301a3d905d75a25bd 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -81,8 +81,6 @@ public:
float innerThreshold() const { return fInnerThreshold; }
float outerThreshold() const { return fOuterThreshold; }
- GrGLFragmentProcessor* createGLInstance() const override;
-
private:
AlphaThresholdEffect(GrProcessorDataManager*,
GrTexture* texture,
@@ -106,6 +104,8 @@ private:
this->addTextureAccess(&fMaskTextureAccess);
}
+ GrGLFragmentProcessor* onCreateGLInstance() const override;
+
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
@@ -130,7 +130,8 @@ public:
virtual void emitCode(EmitArgs&) override;
- void setData(const GrGLProgramDataManager&, const GrProcessor&) override;
+protected:
+ void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
private:
@@ -186,7 +187,7 @@ void GrGLAlphaThresholdEffect::emitCode(EmitArgs& args) {
(GrGLSLExpr4(args.fInputColor) * GrGLSLExpr4("color")).c_str());
}
-void GrGLAlphaThresholdEffect::setData(const GrGLProgramDataManager& pdman,
+void GrGLAlphaThresholdEffect::onSetData(const GrGLProgramDataManager& pdman,
const GrProcessor& proc) {
const AlphaThresholdEffect& alpha_threshold = proc.cast<AlphaThresholdEffect>();
pdman.set1f(fInnerThresholdVar, alpha_threshold.innerThreshold());
@@ -213,7 +214,7 @@ void AlphaThresholdEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
GrGLAlphaThresholdEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* AlphaThresholdEffect::createGLInstance() const {
+GrGLFragmentProcessor* AlphaThresholdEffect::onCreateGLInstance() const {
return SkNEW_ARGS(GrGLAlphaThresholdEffect, (*this));
}
« no previous file with comments | « include/gpu/effects/GrConstColorProcessor.h ('k') | src/effects/SkArithmeticMode_gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698