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

Unified Diff: src/gpu/GrAAConvexPathRenderer.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 | « gm/convexpolyeffect.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 046ef80dc929125c61915c0770fad223a1a52513..a9a3c29612614c79fb26e4540a3b3ce10585d585 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -794,9 +794,10 @@ public:
int firstVertex;
size_t vertexStride = quadProcessor->getVertexStride();
- void *vertices = batchTarget->makeVertSpace(vertexStride, vertexCount,
- &vertexBuffer, &firstVertex);
- if (!vertices) {
+ QuadVertex* verts = reinterpret_cast<QuadVertex*>(batchTarget->makeVertSpace(
+ vertexStride, vertexCount, &vertexBuffer, &firstVertex));
+
+ if (!verts) {
SkDebugf("Could not allocate vertices\n");
return;
}
@@ -810,18 +811,16 @@ public:
return;
}
- QuadVertex* verts = reinterpret_cast<QuadVertex*>(vertices);
-
SkSTArray<kPreallocDrawCnt, Draw, true> draws;
create_vertices(segments, fanPt, &draws, verts, idxs);
- GrVertices info;
+ GrVertices vertices;
for (int i = 0; i < draws.count(); ++i) {
const Draw& draw = draws[i];
- info.initIndexed(kTriangles_GrPrimitiveType, vertexBuffer, indexBuffer, firstVertex,
- firstIndex, draw.fVertexCnt, draw.fIndexCnt);
- batchTarget->draw(info);
+ vertices.initIndexed(kTriangles_GrPrimitiveType, vertexBuffer, indexBuffer,
+ firstVertex, firstIndex, draw.fVertexCnt, draw.fIndexCnt);
+ batchTarget->draw(vertices);
firstVertex += draw.fVertexCnt;
firstIndex += draw.fIndexCnt;
}
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698