| Index: src/gpu/effects/GrConfigConversionEffect.cpp
|
| diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
|
| index 84e60cd76cfdfc771686e2e9ee5ab22ff4286bf8..ea4818a9ca430990b2bdcb87d53fc25a3528ab84 100644
|
| --- a/src/gpu/effects/GrConfigConversionEffect.cpp
|
| +++ b/src/gpu/effects/GrConfigConversionEffect.cpp
|
| @@ -16,15 +16,16 @@
|
| class GrGLConfigConversionEffect : public GrGLEffect {
|
| public:
|
| GrGLConfigConversionEffect(const GrBackendEffectFactory& factory,
|
| - const GrDrawEffect& drawEffect)
|
| + const GrEffect& effect)
|
| : INHERITED (factory) {
|
| - const GrConfigConversionEffect& effect = drawEffect.castEffect<GrConfigConversionEffect>();
|
| - fSwapRedAndBlue = effect.swapsRedAndBlue();
|
| - fPMConversion = effect.pmConversion();
|
| + const GrConfigConversionEffect& configConversionEffect =
|
| + GrEffect::CastEffect<GrConfigConversionEffect>(effect);
|
| + fSwapRedAndBlue = configConversionEffect.swapsRedAndBlue();
|
| + fPMConversion = configConversionEffect.pmConversion();
|
| }
|
|
|
| virtual void emitCode(GrGLProgramBuilder* builder,
|
| - const GrDrawEffect&,
|
| + const GrEffect&,
|
| const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| @@ -84,9 +85,10 @@ public:
|
| fsBuilder->codeAppend(modulate.c_str());
|
| }
|
|
|
| - static inline void GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
|
| + static inline void GenKey(const GrEffect& effect, const GrGLCaps&,
|
| GrEffectKeyBuilder* b) {
|
| - const GrConfigConversionEffect& conv = drawEffect.castEffect<GrConfigConversionEffect>();
|
| + const GrConfigConversionEffect& conv =
|
| + GrEffect::CastEffect<GrConfigConversionEffect>(effect);
|
| uint32_t key = (conv.swapsRedAndBlue() ? 0 : 1) | (conv.pmConversion() << 1);
|
| b->add32(key);
|
| }
|
| @@ -119,7 +121,7 @@ const GrBackendEffectFactory& GrConfigConversionEffect::getFactory() const {
|
| }
|
|
|
| bool GrConfigConversionEffect::onIsEqual(const GrEffect& s) const {
|
| - const GrConfigConversionEffect& other = CastEffect<GrConfigConversionEffect>(s);
|
| + const GrConfigConversionEffect& other = GrEffect::CastEffect<GrConfigConversionEffect>(s);
|
| return this->texture(0) == s.texture(0) &&
|
| other.fSwapRedAndBlue == fSwapRedAndBlue &&
|
| other.fPMConversion == fPMConversion;
|
|
|