Index: src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp |
diff --git a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp |
index 4877071d77686beefc1d03d05a36ffe9be47a6f1..cb3ef7e3d0727594e0b2dc731057f5eb13cc5021 100644 |
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp |
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp |
@@ -57,7 +57,8 @@ void GrGLVertexShaderBuilder::addVarying(GrSLType type, const char* name, const |
} |
-void GrGLVertexShaderBuilder::bindProgramLocations(GrGLuint programId) { |
+void GrGLVertexShaderBuilder::bindProgramLocations(const GrOptDrawState& optState, |
+ GrGLuint programId) { |
const GrGLProgramDesc::KeyHeader& header = fProgramBuilder->desc().getHeader(); |
GrGpuGL* gpu = fProgramBuilder->gpu(); |
@@ -82,14 +83,8 @@ void GrGLVertexShaderBuilder::bindProgramLocations(GrGLuint programId) { |
coverage_attribute_name())); |
} |
- // We pull the current state of attributes off of drawstate's optimized state and bind them in |
- // order. This assumes that the drawState has not changed since we called flushGraphicsState() |
- // higher up in the stack. |
- const GrDrawTargetCaps* caps = fProgramBuilder->gpu()->caps(); |
- const GrDrawState& drawState = *fProgramBuilder->gpu()->drawState(); |
- SkAutoTUnref<GrOptDrawState> optState(drawState.createOptState(*caps)); |
- const GrVertexAttrib* vaPtr = optState->getVertexAttribs(); |
- const int vaCount = optState->getVertexAttribCount(); |
+ const GrVertexAttrib* vaPtr = optState.getVertexAttribs(); |
+ const int vaCount = optState.getVertexAttribCount(); |
int i = fEffectAttribOffset; |
for (int index = 0; index < vaCount; index++) { |