Index: src/gpu/effects/GrBicubicEffect.cpp |
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp |
index 27d482ae2e407206421d9689750a070e57d780f1..e08a602207ea0fb76e8bc07a2dd358d03b1956ca 100644 |
--- a/src/gpu/effects/GrBicubicEffect.cpp |
+++ b/src/gpu/effects/GrBicubicEffect.cpp |
@@ -22,21 +22,21 @@ const SkScalar GrBicubicEffect::gMitchellCoefficients[16] = { |
class GrGLBicubicEffect : public GrGLEffect { |
public: |
GrGLBicubicEffect(const GrBackendEffectFactory& factory, |
- const GrDrawEffect&); |
+ const GrEffect&); |
virtual void emitCode(GrGLProgramBuilder*, |
- const GrDrawEffect&, |
+ const GrEffect&, |
const GrEffectKey&, |
const char* outputColor, |
const char* inputColor, |
const TransformedCoordsArray&, |
const TextureSamplerArray&) SK_OVERRIDE; |
- virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) SK_OVERRIDE; |
+ virtual void setData(const GrGLProgramDataManager&, const GrEffect&) SK_OVERRIDE; |
- static inline void GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&, |
+ static inline void GenKey(const GrEffect& effect, const GrGLCaps&, |
GrEffectKeyBuilder* b) { |
- const GrTextureDomain& domain = drawEffect.castEffect<GrBicubicEffect>().domain(); |
+ const GrTextureDomain& domain = effect.cast<GrBicubicEffect>().domain(); |
b->add32(GrTextureDomain::GLDomain::DomainKey(domain)); |
} |
@@ -50,18 +50,18 @@ private: |
typedef GrGLEffect INHERITED; |
}; |
-GrGLBicubicEffect::GrGLBicubicEffect(const GrBackendEffectFactory& factory, const GrDrawEffect&) |
+GrGLBicubicEffect::GrGLBicubicEffect(const GrBackendEffectFactory& factory, const GrEffect&) |
: INHERITED(factory) { |
} |
void GrGLBicubicEffect::emitCode(GrGLProgramBuilder* builder, |
- const GrDrawEffect& drawEffect, |
+ const GrEffect& effect, |
const GrEffectKey& key, |
const char* outputColor, |
const char* inputColor, |
const TransformedCoordsArray& coords, |
const TextureSamplerArray& samplers) { |
- const GrTextureDomain& domain = drawEffect.castEffect<GrBicubicEffect>().domain(); |
+ const GrTextureDomain& domain = effect.cast<GrBicubicEffect>().domain(); |
fCoefficientsUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
kMat44f_GrSLType, "Coefficients"); |
@@ -116,15 +116,15 @@ void GrGLBicubicEffect::emitCode(GrGLProgramBuilder* builder, |
} |
void GrGLBicubicEffect::setData(const GrGLProgramDataManager& pdman, |
- const GrDrawEffect& drawEffect) { |
- const GrBicubicEffect& effect = drawEffect.castEffect<GrBicubicEffect>(); |
+ const GrEffect& effect) { |
+ const GrBicubicEffect& bicubicEffect = effect.cast<GrBicubicEffect>(); |
const GrTexture& texture = *effect.texture(0); |
float imageIncrement[2]; |
imageIncrement[0] = 1.0f / texture.width(); |
imageIncrement[1] = 1.0f / texture.height(); |
pdman.set2fv(fImageIncrementUni, 1, imageIncrement); |
- pdman.setMatrix4f(fCoefficientsUni, effect.coefficients()); |
- fDomain.setData(pdman, effect.domain(), texture.origin()); |
+ pdman.setMatrix4f(fCoefficientsUni, bicubicEffect.coefficients()); |
+ fDomain.setData(pdman, bicubicEffect.domain(), texture.origin()); |
} |
static inline void convert_row_major_scalar_coeffs_to_column_major_floats(float dst[16], |
@@ -163,7 +163,7 @@ const GrBackendEffectFactory& GrBicubicEffect::getFactory() const { |
} |
bool GrBicubicEffect::onIsEqual(const GrEffect& sBase) const { |
- const GrBicubicEffect& s = CastEffect<GrBicubicEffect>(sBase); |
+ const GrBicubicEffect& s = sBase.cast<GrBicubicEffect>(); |
return this->textureAccess(0) == s.textureAccess(0) && |
!memcmp(fCoefficients, s.coefficients(), 16) && |
fDomain == s.fDomain; |