Let them eat GrEffectRef.
Changes the remaining existing code that operates on naked GrEffects to GrEffectRef.
Review URL: https://codereview.appspot.com/7124058
git-svn-id: http://skia.googlecode.com/svn/trunk@7321 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLEffect.cpp b/src/gpu/gl/GrGLEffect.cpp
index 0bbf1f7..ccea269 100644
--- a/src/gpu/gl/GrGLEffect.cpp
+++ b/src/gpu/gl/GrGLEffect.cpp
@@ -20,11 +20,11 @@
void GrGLEffect::setData(const GrGLUniformManager&, const GrEffectStage&) {
}
-GrGLEffect::EffectKey GrGLEffect::GenTextureKey(const GrEffect& effect,
+GrGLEffect::EffectKey GrGLEffect::GenTextureKey(const GrEffectRef* effect,
const GrGLCaps& caps) {
EffectKey key = 0;
- for (int index = 0; index < effect.numTextures(); ++index) {
- const GrTextureAccess& access = effect.textureAccess(index);
+ for (int index = 0; index < (*effect)->numTextures(); ++index) {
+ const GrTextureAccess& access = (*effect)->textureAccess(index);
EffectKey value = GrGLShaderBuilder::KeyForTextureAccess(access, caps) << index;
GrAssert(0 == (value & key)); // keys for each access ought not to overlap
key |= value;