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

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 820783005: More changes to bring together path / geo procs (Closed) Base URL: https://skia.googlesource.com/skia.git@lc1
Patch Set: some asserts for safety Created 5 years, 11 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
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 92512ac10c0d6c20e9c77dda987cde794bde0b91..35c736b8c8781d73c4e78256958155e2f0a4df3a 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1408,16 +1408,16 @@ void GrGLGpu::setupGeometry(const GrOptDrawState& optState,
GrGLAttribArrayState* attribState =
fHWGeometryState.bindArrayAndBuffersToDraw(this, vbuf, ibuf);
- if (fCurrentProgram->hasVertexShader()) {
- const GrGeometryProcessor* gp = optState.getGeometryProcessor();
+ const GrPrimitiveProcessor* primProc = optState.getPrimitiveProcessor();
+ if (primProc->getAttribs().count() > 0) {
- GrGLsizei stride = static_cast<GrGLsizei>(gp->getVertexStride());
+ GrGLsizei stride = static_cast<GrGLsizei>(primProc->getVertexStride());
size_t vertexOffsetInBytes = stride * info.startVertex();
vertexOffsetInBytes += vbuf->baseOffset();
- const SkTArray<GrGeometryProcessor::GrAttribute, true>& attribs = gp->getAttribs();
+ const SkTArray<GrGeometryProcessor::GrAttribute, true>& attribs = primProc->getAttribs();
int vaCount = attribs.count();
uint32_t usedAttribArraysMask = 0;
size_t offset = 0;

Powered by Google App Engine
This is Rietveld 408576698