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

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

Issue 554833002: Calculate Primary and Secondary output types in the GrOptDrawState (Closed) Base URL: https://skia.googlesource.com/skia.git@optReadDst
Patch Set: Rebase Created 6 years, 3 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/GrGLFragmentShaderBuilder.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 ad614659416dd3fd197f608615b80d6fd75a31b9..f99791e24e3ab6ce709f745fb94f438f6fdaaf71 100644
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
@@ -87,7 +87,9 @@ void GrGLVertexShaderBuilder::bindProgramLocations(GrGLuint programId) {
// 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.
- SkAutoTUnref<GrOptDrawState> optState(fProgramBuilder->gpu()->drawState()->createOptState());
+ 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();
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698