Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Unified Diff: src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp

Issue 628293002: Plumb OptDrawState down to VertexShaderBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..55ce7d14587b5d9045440fa51e54f7c0b5868aa1 100644
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
@@ -82,14 +82,9 @@ 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 GrOptDrawState& optState = fProgramBuilder->optState();
+ const GrVertexAttrib* vaPtr = optState.getVertexAttribs();
+ const int vaCount = optState.getVertexAttribCount();
int i = fEffectAttribOffset;
for (int index = 0; index < vaCount; index++) {
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698