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

Unified Diff: src/gpu/batches/GrPLSPathRenderer.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/batches/GrNonAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrTInstanceBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrPLSPathRenderer.cpp
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index c94eb07aa1866f4f3209410c02811371672e3247..348681f43f3178e76069fe4ffb7946c80e0614e3 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -864,7 +864,7 @@ public:
pathPtr = tmpPathPtr;
}
- GrVertices grVertices;
+ GrMesh mesh;
PLSVertices triVertices;
PLSVertices quadVertices;
@@ -885,10 +885,10 @@ public:
for (int i = 0; i < triVertices.count(); ++i) {
triVerts[i] = triVertices[i];
}
- grVertices.init(kTriangles_GrPrimitiveType, triVertexBuffer, firstTriVertex,
- triVertices.count());
- target->initDraw(triangleProcessor, this->pipeline());
- target->draw(grVertices);
+ mesh.init(kTriangles_GrPrimitiveType, triVertexBuffer, firstTriVertex,
+ triVertices.count());
+ target->initDraw(triangleProcessor);
+ target->draw(mesh);
}
if (quadVertices.count()) {
@@ -904,10 +904,10 @@ public:
for (int i = 0; i < quadVertices.count(); ++i) {
quadVerts[i] = quadVertices[i];
}
- grVertices.init(kTriangles_GrPrimitiveType, quadVertexBuffer, firstQuadVertex,
- quadVertices.count());
- target->initDraw(quadProcessor, this->pipeline());
- target->draw(grVertices);
+ mesh.init(kTriangles_GrPrimitiveType, quadVertexBuffer, firstQuadVertex,
+ quadVertices.count());
+ target->initDraw(quadProcessor);
+ target->draw(mesh);
}
SkAutoTUnref<GrGeometryProcessor> finishProcessor(
@@ -933,10 +933,10 @@ public:
rectVerts[4] = { bounds.fRight, bounds.fTop };
rectVerts[5] = { bounds.fRight, bounds.fBottom };
- grVertices.init(kTriangles_GrPrimitiveType, rectVertexBuffer, firstRectVertex,
- kRectVertexCount);
- target->initDraw(finishProcessor, this->pipeline());
- target->draw(grVertices);
+ mesh.init(kTriangles_GrPrimitiveType, rectVertexBuffer, firstRectVertex,
+ kRectVertexCount);
+ target->initDraw(finishProcessor);
+ target->draw(mesh);
}
}
« no previous file with comments | « src/gpu/batches/GrNonAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrTInstanceBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698