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

Unified Diff: src/effects/SkDisplacementMapEffect.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/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index c3033017144600ab87e18ba2451ac8c62eb145d3..f360fe102c94637cd1ef12ad4a6a4ba68ee51da0 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -310,9 +310,11 @@ public:
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
- void setData(const GrGLProgramDataManager&, const GrProcessor&) override;
const GrTextureDomain::GLDomain& glDomain() const { return fGLDomain; }
+protected:
+ void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+
private:
SkDisplacementMapEffect::ChannelSelectorType fXChannelSelector;
SkDisplacementMapEffect::ChannelSelectorType fYChannelSelector;
@@ -344,10 +346,6 @@ public:
virtual ~GrDisplacementMapEffect();
- GrGLFragmentProcessor* createGLInstance() const override {
- return SkNEW_ARGS(GrGLDisplacementMapEffect, (*this));
- }
-
SkDisplacementMapEffect::ChannelSelectorType xChannelSelector() const
{ return fXChannelSelector; }
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector() const
@@ -358,6 +356,10 @@ public:
const GrTextureDomain& domain() const { return fDomain; }
private:
+ GrGLFragmentProcessor* onCreateGLInstance() const override {
+ return SkNEW_ARGS(GrGLDisplacementMapEffect, (*this));
+ }
+
virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const override {
GrGLDisplacementMapEffect::GenKey(*this, caps, b);
@@ -621,7 +623,7 @@ void GrGLDisplacementMapEffect::emitCode(EmitArgs& args) {
fsBuilder->codeAppend(";\n");
}
-void GrGLDisplacementMapEffect::setData(const GrGLProgramDataManager& pdman,
+void GrGLDisplacementMapEffect::onSetData(const GrGLProgramDataManager& pdman,
const GrProcessor& proc) {
const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMapEffect>();
GrTexture* colorTex = displacementMap.texture(1);
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698