| Index: src/core/SkXfermode.cpp
|
| diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
|
| index 91aa84706bd00cf53b9aaadbaf25714bc3f27d18..db9d332e795c824d9de6abc4e7a6edf670cdef8d 100644
|
| --- a/src/core/SkXfermode.cpp
|
| +++ b/src/core/SkXfermode.cpp
|
| @@ -818,18 +818,19 @@ public:
|
|
|
| class GLEffect : public GrGLEffect {
|
| public:
|
| - GLEffect(const GrBackendEffectFactory& factory, const GrDrawEffect&)
|
| + GLEffect(const GrBackendEffectFactory& factory, const GrEffect&)
|
| : GrGLEffect(factory) {
|
| }
|
| virtual void emitCode(GrGLProgramBuilder* builder,
|
| - const GrDrawEffect& drawEffect,
|
| + const GrEffect& effect,
|
| const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray& coords,
|
| const TextureSamplerArray& samplers) SK_OVERRIDE {
|
| - SkXfermode::Mode mode = drawEffect.castEffect<XferEffect>().mode();
|
| - const GrTexture* backgroundTex = drawEffect.castEffect<XferEffect>().backgroundAccess().getTexture();
|
| + SkXfermode::Mode mode = effect.cast<XferEffect>().mode();
|
| + const GrTexture* backgroundTex =
|
| + effect.cast<XferEffect>().backgroundAccess().getTexture();
|
| GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
|
| const char* dstColor;
|
| if (backgroundTex) {
|
| @@ -970,12 +971,12 @@ public:
|
| }
|
| }
|
|
|
| - static inline void GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
|
| + static inline void GenKey(const GrEffect& effect, const GrGLCaps&,
|
| GrEffectKeyBuilder* b) {
|
| // The background may come from the dst or from a texture.
|
| - uint32_t key = drawEffect.effect()->numTextures();
|
| + uint32_t key = effect.numTextures();
|
| SkASSERT(key <= 1);
|
| - key |= drawEffect.castEffect<XferEffect>().mode() << 1;
|
| + key |= effect.cast<XferEffect>().mode() << 1;
|
| b->add32(key);
|
| }
|
|
|
| @@ -1214,7 +1215,7 @@ private:
|
| }
|
| }
|
| virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
|
| - const XferEffect& s = CastEffect<XferEffect>(other);
|
| + const XferEffect& s = other.cast<XferEffect>();
|
| return fMode == s.fMode &&
|
| fBackgroundAccess.getTexture() == s.fBackgroundAccess.getTexture();
|
| }
|
|
|