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

Unified Diff: src/effects/SkLightingImageFilter.cpp

Issue 1266633003: Added registerChild; transforms, textures, glKey automatically handled. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: refactored to onGetGLProcessorKey; removed emitSamplers specialized template; fixed nits 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/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLightingImageFilter.cpp
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index a30955faf7f7a1561549eabe415b6b1d34bc14be..cc3b3357f63276c14e297c2bba2e97ff137bfafe 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -534,13 +534,13 @@ public:
const char* name() const override { return "DiffuseLighting"; }
- void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
-
GrGLFragmentProcessor* createGLInstance() const override;
SkScalar kd() const { return fKD; }
private:
+ void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+
bool onIsEqual(const GrFragmentProcessor&) const override;
GrDiffuseLightingEffect(GrProcessorDataManager*,
@@ -578,14 +578,14 @@ public:
const char* name() const override { return "SpecularLighting"; }
- void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
-
GrGLFragmentProcessor* createGLInstance() const override;
SkScalar ks() const { return fKS; }
SkScalar shininess() const { return fShininess; }
private:
+ void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+
bool onIsEqual(const GrFragmentProcessor&) const override;
GrSpecularLightingEffect(GrProcessorDataManager*,
@@ -1613,7 +1613,7 @@ bool GrDiffuseLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const
this->kd() == s.kd();
}
-void GrDiffuseLightingEffect::getGLProcessorKey(const GrGLSLCaps& caps,
+void GrDiffuseLightingEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const {
GrGLDiffuseLightingEffect::GenKey(*this, caps, b);
}
@@ -1815,7 +1815,7 @@ bool GrSpecularLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const
this->shininess() == s.shininess();
}
-void GrSpecularLightingEffect::getGLProcessorKey(const GrGLSLCaps& caps,
+void GrSpecularLightingEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const {
GrGLSpecularLightingEffect::GenKey(*this, caps, b);
}
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLightingShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698