Index: src/effects/SkMorphologyImageFilter.cpp |
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp |
index 02c0be1674a7724ae5140e6f22d0bf39fde122cd..df04cb170d881f1bf2a14fdf76a55610a803c9e0 100644 |
--- a/src/effects/SkMorphologyImageFilter.cpp |
+++ b/src/effects/SkMorphologyImageFilter.cpp |
@@ -328,19 +328,19 @@ |
class GrGLMorphologyEffect : public GrGLEffect { |
public: |
- GrGLMorphologyEffect (const GrBackendEffectFactory&, const GrEffect&); |
+ GrGLMorphologyEffect (const GrBackendEffectFactory&, const GrDrawEffect&); |
virtual void emitCode(GrGLProgramBuilder*, |
- const GrEffect&, |
+ const GrDrawEffect&, |
const GrEffectKey&, |
const char* outputColor, |
const char* inputColor, |
const TransformedCoordsArray&, |
const TextureSamplerArray&) SK_OVERRIDE; |
- static inline void GenKey(const GrEffect&, const GrGLCaps&, GrEffectKeyBuilder* b); |
- |
- virtual void setData(const GrGLProgramDataManager&, const GrEffect&) SK_OVERRIDE; |
+ static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder* b); |
+ |
+ virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) SK_OVERRIDE; |
private: |
int width() const { return GrMorphologyEffect::WidthFromRadius(fRadius); } |
@@ -353,15 +353,15 @@ |
}; |
GrGLMorphologyEffect::GrGLMorphologyEffect(const GrBackendEffectFactory& factory, |
- const GrEffect& effect) |
+ const GrDrawEffect& drawEffect) |
: INHERITED(factory) { |
- const GrMorphologyEffect& m = effect.cast<GrMorphologyEffect>(); |
+ const GrMorphologyEffect& m = drawEffect.castEffect<GrMorphologyEffect>(); |
fRadius = m.radius(); |
fType = m.type(); |
} |
void GrGLMorphologyEffect::emitCode(GrGLProgramBuilder* builder, |
- const GrEffect&, |
+ const GrDrawEffect&, |
const GrEffectKey& key, |
const char* outputColor, |
const char* inputColor, |
@@ -401,17 +401,17 @@ |
fsBuilder->codeAppend(modulate.c_str()); |
} |
-void GrGLMorphologyEffect::GenKey(const GrEffect& effect, |
+void GrGLMorphologyEffect::GenKey(const GrDrawEffect& drawEffect, |
const GrGLCaps&, GrEffectKeyBuilder* b) { |
- const GrMorphologyEffect& m = effect.cast<GrMorphologyEffect>(); |
+ const GrMorphologyEffect& m = drawEffect.castEffect<GrMorphologyEffect>(); |
uint32_t key = static_cast<uint32_t>(m.radius()); |
key |= (m.type() << 8); |
b->add32(key); |
} |
void GrGLMorphologyEffect::setData(const GrGLProgramDataManager& pdman, |
- const GrEffect& effect) { |
- const Gr1DKernelEffect& kern = effect.cast<Gr1DKernelEffect>(); |
+ const GrDrawEffect& drawEffect) { |
+ const Gr1DKernelEffect& kern = drawEffect.castEffect<Gr1DKernelEffect>(); |
GrTexture& texture = *kern.texture(0); |
// the code we generated was for a specific kernel radius |
SkASSERT(kern.radius() == fRadius); |
@@ -447,7 +447,7 @@ |
} |
bool GrMorphologyEffect::onIsEqual(const GrEffect& sBase) const { |
- const GrMorphologyEffect& s = sBase.cast<GrMorphologyEffect>(); |
+ const GrMorphologyEffect& s = CastEffect<GrMorphologyEffect>(sBase); |
return (this->texture(0) == s.texture(0) && |
this->radius() == s.radius() && |
this->direction() == s.direction() && |