Index: src/gpu/effects/GrConvolutionEffect.cpp |
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp |
index b0abdcf9ed075ea228014dee56e4268be23dc25e..90a655c920037eda0061affe723d813247de1782 100644 |
--- a/src/gpu/effects/GrConvolutionEffect.cpp |
+++ b/src/gpu/effects/GrConvolutionEffect.cpp |
@@ -17,19 +17,19 @@ |
class GrGLConvolutionEffect : public GrGLEffect { |
public: |
- GrGLConvolutionEffect(const GrBackendEffectFactory&, const GrEffect&); |
+ GrGLConvolutionEffect(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; |
- virtual void setData(const GrGLProgramDataManager& pdman, const GrEffect&) SK_OVERRIDE; |
- |
- static inline void GenKey(const GrEffect&, const GrGLCaps&, GrEffectKeyBuilder*); |
+ virtual void setData(const GrGLProgramDataManager& pdman, const GrDrawEffect&) SK_OVERRIDE; |
+ |
+ static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*); |
private: |
int width() const { return Gr1DKernelEffect::WidthFromRadius(fRadius); } |
@@ -47,16 +47,16 @@ |
}; |
GrGLConvolutionEffect::GrGLConvolutionEffect(const GrBackendEffectFactory& factory, |
- const GrEffect& effect) |
+ const GrDrawEffect& drawEffect) |
: INHERITED(factory) { |
- const GrConvolutionEffect& c = effect.cast<GrConvolutionEffect>(); |
+ const GrConvolutionEffect& c = drawEffect.castEffect<GrConvolutionEffect>(); |
fRadius = c.radius(); |
fUseBounds = c.useBounds(); |
fDirection = c.direction(); |
} |
void GrGLConvolutionEffect::emitCode(GrGLProgramBuilder* builder, |
- const GrEffect&, |
+ const GrDrawEffect&, |
const GrEffectKey& key, |
const char* outputColor, |
const char* inputColor, |
@@ -106,8 +106,8 @@ |
} |
void GrGLConvolutionEffect::setData(const GrGLProgramDataManager& pdman, |
- const GrEffect& effect) { |
- const GrConvolutionEffect& conv = effect.cast<GrConvolutionEffect>(); |
+ const GrDrawEffect& drawEffect) { |
+ const GrConvolutionEffect& conv = drawEffect.castEffect<GrConvolutionEffect>(); |
GrTexture& texture = *conv.texture(0); |
// the code we generated was for a specific kernel radius |
SkASSERT(conv.radius() == fRadius); |
@@ -136,9 +136,9 @@ |
pdman.set1fv(fKernelUni, this->width(), conv.kernel()); |
} |
-void GrGLConvolutionEffect::GenKey(const GrEffect& effect, const GrGLCaps&, |
+void GrGLConvolutionEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&, |
GrEffectKeyBuilder* b) { |
- const GrConvolutionEffect& conv = effect.cast<GrConvolutionEffect>(); |
+ const GrConvolutionEffect& conv = drawEffect.castEffect<GrConvolutionEffect>(); |
uint32_t key = conv.radius(); |
key <<= 2; |
if (conv.useBounds()) { |
@@ -201,7 +201,7 @@ |
} |
bool GrConvolutionEffect::onIsEqual(const GrEffect& sBase) const { |
- const GrConvolutionEffect& s = sBase.cast<GrConvolutionEffect>(); |
+ const GrConvolutionEffect& s = CastEffect<GrConvolutionEffect>(sBase); |
return (this->texture(0) == s.texture(0) && |
this->radius() == s.radius() && |
this->direction() == s.direction() && |