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

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

Issue 560443004: Revert of Attach GrOptDrawState into shader building pipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@opt2
Patch Set: 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/GrGpuGL_program.cpp ('k') | no next file » | 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 5c074a2901799c179ae8a51004bf264614f812c0..f06c6468cc1eb6a45dbd74627fd16fda1761bf89 100644
--- a/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp
@@ -9,7 +9,6 @@
#include "GrGLProgramBuilder.h"
#include "GrGLShaderStringBuilder.h"
#include "../GrGpuGL.h"
-#include "../../GrOptDrawState.h"
#define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X)
#define GL_CALL_RET(R, X) GR_GL_CALL_RET(gpu->glInterface(), R, X)
@@ -84,12 +83,10 @@
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.
- SkAutoTUnref<GrOptDrawState> optState(fProgramBuilder->gpu()->drawState()->createOptState());
- const GrVertexAttrib* vaPtr = optState->getVertexAttribs();
- const int vaCount = optState->getVertexAttribCount();
+ // We pull the current state of attributes off of drawstate and bind them in order
+ const GrRODrawState* ds = fProgramBuilder->gpu()->drawState();
+ const GrVertexAttrib* vaPtr = ds->getVertexAttribs();
+ const int vaCount = ds->getVertexAttribCount();
int i = fEffectAttribOffset;
for (int index = 0; index < vaCount; index++) {
« no previous file with comments | « src/gpu/gl/GrGpuGL_program.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698