Index: src/effects/SkArithmeticMode.cpp |
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp |
index 216009626f402552c83b06d356190ea272097c60..22f464cb4923115bc1aba8d8d9290c8bfdcab58f 100644 |
--- a/src/effects/SkArithmeticMode.cpp |
+++ b/src/effects/SkArithmeticMode.cpp |
@@ -249,20 +249,20 @@ |
class GrGLArithmeticEffect : public GrGLEffect { |
public: |
- GrGLArithmeticEffect(const GrBackendEffectFactory&, const GrEffect&); |
+ GrGLArithmeticEffect(const GrBackendEffectFactory&, const GrDrawEffect&); |
virtual ~GrGLArithmeticEffect(); |
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&, const GrEffect&) SK_OVERRIDE; |
- |
- static void GenKey(const GrEffect&, const GrGLCaps& caps, GrEffectKeyBuilder* b); |
+ virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) SK_OVERRIDE; |
+ |
+ static void GenKey(const GrDrawEffect&, const GrGLCaps& caps, GrEffectKeyBuilder* b); |
private: |
GrGLProgramDataManager::UniformHandle fKUni; |
@@ -330,7 +330,7 @@ |
} |
bool GrArithmeticEffect::onIsEqual(const GrEffect& sBase) const { |
- const GrArithmeticEffect& s = sBase.cast<GrArithmeticEffect>(); |
+ const GrArithmeticEffect& s = CastEffect<GrArithmeticEffect>(sBase); |
return fK1 == s.fK1 && |
fK2 == s.fK2 && |
fK3 == s.fK3 && |
@@ -351,7 +351,7 @@ |
/////////////////////////////////////////////////////////////////////////////// |
GrGLArithmeticEffect::GrGLArithmeticEffect(const GrBackendEffectFactory& factory, |
- const GrEffect& effect) |
+ const GrDrawEffect& drawEffect) |
: INHERITED(factory), |
fEnforcePMColor(true) { |
} |
@@ -360,14 +360,14 @@ |
} |
void GrGLArithmeticEffect::emitCode(GrGLProgramBuilder* builder, |
- const GrEffect& effect, |
+ const GrDrawEffect& drawEffect, |
const GrEffectKey& key, |
const char* outputColor, |
const char* inputColor, |
const TransformedCoordsArray& coords, |
const TextureSamplerArray& samplers) { |
- GrTexture* backgroundTex = effect.cast<GrArithmeticEffect>().backgroundTexture(); |
+ GrTexture* backgroundTex = drawEffect.castEffect<GrArithmeticEffect>().backgroundTexture(); |
GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder(); |
const char* dstColor; |
if (backgroundTex) { |
@@ -408,15 +408,15 @@ |
} |
} |
-void GrGLArithmeticEffect::setData(const GrGLProgramDataManager& pdman, const GrEffect& effect) { |
- const GrArithmeticEffect& arith = effect.cast<GrArithmeticEffect>(); |
+void GrGLArithmeticEffect::setData(const GrGLProgramDataManager& pdman, const GrDrawEffect& drawEffect) { |
+ const GrArithmeticEffect& arith = drawEffect.castEffect<GrArithmeticEffect>(); |
pdman.set4f(fKUni, arith.k1(), arith.k2(), arith.k3(), arith.k4()); |
fEnforcePMColor = arith.enforcePMColor(); |
} |
-void GrGLArithmeticEffect::GenKey(const GrEffect& effect, |
+void GrGLArithmeticEffect::GenKey(const GrDrawEffect& drawEffect, |
const GrGLCaps&, GrEffectKeyBuilder* b) { |
- const GrArithmeticEffect& arith = effect.cast<GrArithmeticEffect>(); |
+ const GrArithmeticEffect& arith = drawEffect.castEffect<GrArithmeticEffect>(); |
uint32_t key = arith.enforcePMColor() ? 1 : 0; |
if (arith.backgroundTexture()) { |
key |= 2; |