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

Unified Diff: src/gpu/batches/GrAAConvexPathRenderer.cpp

Issue 1806983002: Update how we send draws to gpu backend to reduce state setting. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 9 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/GrVertices.h ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index 9af3d797593c3115001963e329b9e8aa1bd16f04..f6be36669799a5e5908db001a503a50e3742a44d 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -793,7 +793,7 @@ private:
return;
}
- target->initDraw(gp, this->pipeline());
+ target->initDraw(gp);
size_t vertexStride = gp->getVertexStride();
@@ -835,12 +835,12 @@ private:
extract_verts(tess, verts, vertexStride, args.fColor, idxs, canTweakAlphaForCoverage);
- GrVertices info;
- info.initIndexed(kTriangles_GrPrimitiveType,
+ GrMesh mesh;
+ mesh.initIndexed(kTriangles_GrPrimitiveType,
vertexBuffer, indexBuffer,
firstVertex, firstIndex,
tess.numPts(), tess.numIndices());
- target->draw(info);
+ target->draw(mesh);
}
}
@@ -864,7 +864,7 @@ private:
SkAutoTUnref<GrGeometryProcessor> quadProcessor(
QuadEdgeEffect::Create(this->color(), invert, this->usesLocalCoords()));
- target->initDraw(quadProcessor, this->pipeline());
+ target->initDraw(quadProcessor);
// TODO generate all segments for all paths and use one vertex buffer
for (int i = 0; i < instanceCount; i++) {
@@ -924,13 +924,13 @@ private:
SkSTArray<kPreallocDrawCnt, Draw, true> draws;
create_vertices(segments, fanPt, &draws, verts, idxs);
- GrVertices vertices;
+ GrMesh mesh;
for (int j = 0; j < draws.count(); ++j) {
const Draw& draw = draws[j];
- vertices.initIndexed(kTriangles_GrPrimitiveType, vertexBuffer, indexBuffer,
- firstVertex, firstIndex, draw.fVertexCnt, draw.fIndexCnt);
- target->draw(vertices);
+ mesh.initIndexed(kTriangles_GrPrimitiveType, vertexBuffer, indexBuffer,
+ firstVertex, firstIndex, draw.fVertexCnt, draw.fIndexCnt);
+ target->draw(mesh);
firstVertex += draw.fVertexCnt;
firstIndex += draw.fIndexCnt;
}
« no previous file with comments | « src/gpu/GrVertices.h ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698