Make GrGLProgram be responsible for calling setData on custom stages.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6752044
git-svn-id: http://skia.googlecode.com/svn/trunk@6027 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 5f5a3a6..3439230 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -383,18 +383,13 @@
this->flushColor(color);
this->flushCoverage(coverage);
+ fCurrentProgram->setData(drawState);
+
for (int s = 0; s < GrDrawState::kNumStages; ++s) {
if (this->isStageEnabled(s)) {
this->flushBoundTextureAndParams(s);
this->flushTextureMatrix(s);
-
- if (NULL != fCurrentProgram->fProgramStage[s]) {
- const GrSamplerState& sampler = this->getDrawState().getSampler(s);
- fCurrentProgram->fProgramStage[s]->setData(fCurrentProgram->fUniformManager,
- *sampler.getCustomStage(),
- drawState.getRenderTarget(), s);
- }
}
}
}