Remove GrDrawState::setTexture/getTexture
Review URL: http://codereview.appspot.com/6455051/
git-svn-id: http://skia.googlecode.com/svn/trunk@4826 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 79ea706..68f7a9a 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -2135,8 +2135,9 @@
void GrGpuGL::flushBoundTextureAndParams(int stage) {
GrDrawState* drawState = this->drawState();
-
- GrGLTexture* nextTexture = static_cast<GrGLTexture*>(drawState->getTexture(stage));
+ // FIXME: Assuming one texture maximum per custom stage
+ const GrCustomStage* customStage = drawState->sampler(stage)->getCustomStage();
+ GrGLTexture* nextTexture = static_cast<GrGLTexture*>(customStage->texture(0));
// Currently we always use the texture params from the GrSamplerState. Soon custom stages
// will provide their own params.
const GrTextureParams& texParams = drawState->getSampler(stage).getTextureParams();