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

Unified Diff: src/effects/SkLightingImageFilter.cpp

Issue 654273002: Push isEqual/onIsEqual down from GrProcessor to subclasses. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/SkLumaColorFilter.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 b882456234ec8b1c252be824e014da12f02bce65..a280d5f5762643c1f6273222f23554fb32bca8d6 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -351,7 +351,7 @@ public:
const SkMatrix& filterMatrix() const { return fFilterMatrix; }
protected:
- virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
+ virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERRIDE {
// lighting shaders are complicated. We just throw up our hands.
@@ -387,7 +387,7 @@ public:
SkScalar kd() const { return fKD; }
private:
- virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
+ virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
GrDiffuseLightingEffect(GrTexture* texture,
const SkLight* light,
@@ -424,7 +424,7 @@ public:
SkScalar shininess() const { return fShininess; }
private:
- virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE;
+ virtual bool onIsEqual(const GrFragmentProcessor&) const SK_OVERRIDE;
GrSpecularLightingEffect(GrTexture* texture,
const SkLight* light,
@@ -1302,7 +1302,7 @@ GrLightingEffect::~GrLightingEffect() {
fLight->unref();
}
-bool GrLightingEffect::onIsEqual(const GrProcessor& sBase) const {
+bool GrLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
const GrLightingEffect& s = sBase.cast<GrLightingEffect>();
return this->texture(0) == s.texture(0) &&
fLight->isEqual(*s.fLight) &&
@@ -1323,7 +1323,7 @@ const GrBackendFragmentProcessorFactory& GrDiffuseLightingEffect::getFactory() c
return GrTBackendFragmentProcessorFactory<GrDiffuseLightingEffect>::getInstance();
}
-bool GrDiffuseLightingEffect::onIsEqual(const GrProcessor& sBase) const {
+bool GrDiffuseLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
const GrDiffuseLightingEffect& s = sBase.cast<GrDiffuseLightingEffect>();
return INHERITED::onIsEqual(sBase) &&
this->kd() == s.kd();
@@ -1529,7 +1529,7 @@ const GrBackendFragmentProcessorFactory& GrSpecularLightingEffect::getFactory()
return GrTBackendFragmentProcessorFactory<GrSpecularLightingEffect>::getInstance();
}
-bool GrSpecularLightingEffect::onIsEqual(const GrProcessor& sBase) const {
+bool GrSpecularLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
const GrSpecularLightingEffect& s = sBase.cast<GrSpecularLightingEffect>();
return INHERITED::onIsEqual(sBase) &&
this->ks() == s.ks() &&
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkLumaColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698