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

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

Issue 1127273007: Iterate over instanced draws in GrGpu rather than above GrBatchTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove dead code Created 5 years, 7 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/GrGLGpu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 8b83dc0d718068b926d07dc58d2d715bec61703c..a212b2bfff7eb08c0f1b1cb425ae16ce536c5efb 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -1452,20 +1452,20 @@ bool GrGLGpu::flushGLState(const DrawArgs& args) {
}
void GrGLGpu::setupGeometry(const GrPrimitiveProcessor& primProc,
- const GrVertices& info,
+ const GrNonInstancedVertices& vertices,
size_t* indexOffsetInBytes) {
GrGLVertexBuffer* vbuf;
- vbuf = (GrGLVertexBuffer*) info.vertexBuffer();
+ vbuf = (GrGLVertexBuffer*) vertices.vertexBuffer();
SkASSERT(vbuf);
SkASSERT(!vbuf->isMapped());
GrGLIndexBuffer* ibuf = NULL;
- if (info.isIndexed()) {
+ if (vertices.isIndexed()) {
SkASSERT(indexOffsetInBytes);
*indexOffsetInBytes = 0;
- ibuf = (GrGLIndexBuffer*)info.indexBuffer();
+ ibuf = (GrGLIndexBuffer*)vertices.indexBuffer();
SkASSERT(ibuf);
SkASSERT(!ibuf->isMapped());
@@ -1479,7 +1479,7 @@ void GrGLGpu::setupGeometry(const GrPrimitiveProcessor& primProc,
GrGLsizei stride = static_cast<GrGLsizei>(primProc.getVertexStride());
- size_t vertexOffsetInBytes = stride * info.startVertex();
+ size_t vertexOffsetInBytes = stride * vertices.startVertex();
vertexOffsetInBytes += vbuf->baseOffset();
@@ -1895,7 +1895,7 @@ GrGLenum gPrimitiveType2GLMode[] = {
#endif
#endif
-void GrGLGpu::onDraw(const DrawArgs& args, const GrVertices& vertices) {
+void GrGLGpu::onDraw(const DrawArgs& args, const GrNonInstancedVertices& vertices) {
if (!this->flushGLState(args)) {
return;
}
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698