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

Unified Diff: src/gpu/effects/GrConfigConversionEffect.cpp

Issue 577593003: Revert of removing GrDrawEffect (Closed) Base URL: https://skia.googlesource.com/skia.git@gp3
Patch Set: Created 6 years, 3 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/gpu/effects/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConfigConversionEffect.cpp
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index e00ad53e5729b49339ea33c2855ad3ca02a1932b..84e60cd76cfdfc771686e2e9ee5ab22ff4286bf8 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -16,15 +16,15 @@
class GrGLConfigConversionEffect : public GrGLEffect {
public:
GrGLConfigConversionEffect(const GrBackendEffectFactory& factory,
- const GrEffect& effect)
+ const GrDrawEffect& drawEffect)
: INHERITED (factory) {
- const GrConfigConversionEffect& configConversionEffect = effect.cast<GrConfigConversionEffect>();
- fSwapRedAndBlue = configConversionEffect.swapsRedAndBlue();
- fPMConversion = configConversionEffect.pmConversion();
+ const GrConfigConversionEffect& effect = drawEffect.castEffect<GrConfigConversionEffect>();
+ fSwapRedAndBlue = effect.swapsRedAndBlue();
+ fPMConversion = effect.pmConversion();
}
virtual void emitCode(GrGLProgramBuilder* builder,
- const GrEffect&,
+ const GrDrawEffect&,
const GrEffectKey& key,
const char* outputColor,
const char* inputColor,
@@ -84,9 +84,9 @@
fsBuilder->codeAppend(modulate.c_str());
}
- static inline void GenKey(const GrEffect& effect, const GrGLCaps&,
+ static inline void GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
GrEffectKeyBuilder* b) {
- const GrConfigConversionEffect& conv = effect.cast<GrConfigConversionEffect>();
+ const GrConfigConversionEffect& conv = drawEffect.castEffect<GrConfigConversionEffect>();
uint32_t key = (conv.swapsRedAndBlue() ? 0 : 1) | (conv.pmConversion() << 1);
b->add32(key);
}
@@ -119,7 +119,7 @@
}
bool GrConfigConversionEffect::onIsEqual(const GrEffect& s) const {
- const GrConfigConversionEffect& other = s.cast<GrConfigConversionEffect>();
+ const GrConfigConversionEffect& other = CastEffect<GrConfigConversionEffect>(s);
return this->texture(0) == s.texture(0) &&
other.fSwapRedAndBlue == fSwapRedAndBlue &&
other.fPMConversion == fPMConversion;
« no previous file with comments | « src/gpu/effects/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698