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/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index e7609d8..70fdff9 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -757,7 +757,7 @@
GrAssert(NULL != drawState.getRenderTarget());
for (int s = 0; s < GrDrawState::kNumStages; ++s) {
if (drawState.isStageEnabled(s)) {
- const GrEffect* effect = drawState.getStage(s).getEffect();
+ const GrEffectRef& effect = *drawState.getStage(s).getEffect();
int numTextures = effect->numTextures();
for (int t = 0; t < numTextures; ++t) {
GrTexture* texture = effect->texture(t);
@@ -840,9 +840,9 @@
// Run through the color stages
int stageCnt = drawState.getFirstCoverageStage();
for (int s = 0; s < stageCnt; ++s) {
- const GrEffect* effect = drawState.getStage(s).getEffect();
+ const GrEffectRef* effect = drawState.getStage(s).getEffect();
if (NULL != effect) {
- effect->getConstantColorComponents(&color, &validComponentFlags);
+ (*effect)->getConstantColorComponents(&color, &validComponentFlags);
}
}
@@ -866,9 +866,9 @@
}
}
for (int s = drawState.getFirstCoverageStage(); s < GrDrawState::kNumStages; ++s) {
- const GrEffect* effect = drawState.getStage(s).getEffect();
+ const GrEffectRef* effect = drawState.getStage(s).getEffect();
if (NULL != effect) {
- effect->getConstantColorComponents(&color, &validComponentFlags);
+ (*effect)->getConstantColorComponents(&color, &validComponentFlags);
}
}
}