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

Unified Diff: src/gpu/GrDefaultPathRenderer.cpp

Issue 1124633003: Revert of Start on simplifying generateGeometry() overrides (Closed) Base URL: https://skia.googlesource.com/skia.git@ibcache
Patch Set: Created 5 years, 8 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/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index a86d117f595d278f7507a3ff1c71e8e88d116245..93d64abab25936ba881a842312643cfde1784778 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -329,8 +329,8 @@
return;
}
- const GrIndexBuffer* indexBuffer = NULL;
- int firstIndex = 0;
+ const GrIndexBuffer* indexBuffer;
+ int firstIndex;
void* indices = NULL;
if (isIndexed) {
@@ -370,11 +370,17 @@
}
GrDrawTarget::DrawInfo drawInfo;
+ drawInfo.setPrimitiveType(primitiveType);
+ drawInfo.setVertexBuffer(vertexBuffer);
+ drawInfo.setStartVertex(firstVertex);
+ drawInfo.setVertexCount(vertexOffset);
if (isIndexed) {
- drawInfo.initIndexed(primitiveType, vertexBuffer, indexBuffer, firstVertex, firstIndex,
- vertexOffset, indexOffset);
+ drawInfo.setIndexBuffer(indexBuffer);
+ drawInfo.setStartIndex(firstIndex);
+ drawInfo.setIndexCount(indexOffset);
} else {
- drawInfo.init(primitiveType, vertexBuffer, firstVertex, vertexOffset);
+ drawInfo.setStartIndex(0);
+ drawInfo.setIndexCount(0);
}
batchTarget->draw(drawInfo);
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698