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

Unified Diff: src/gpu/batches/GrNonAAStrokeRectBatch.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/GrNinePatch.cpp ('k') | src/gpu/batches/GrPLSPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrNonAAStrokeRectBatch.cpp
diff --git a/src/gpu/batches/GrNonAAStrokeRectBatch.cpp b/src/gpu/batches/GrNonAAStrokeRectBatch.cpp
index 6766de2e3b2370d5fe835f03133e9e31bdadc7fc..a87ab113835587a6bcb4be560ed33bfc3a292444 100644
--- a/src/gpu/batches/GrNonAAStrokeRectBatch.cpp
+++ b/src/gpu/batches/GrNonAAStrokeRectBatch.cpp
@@ -117,7 +117,7 @@ private:
this->viewMatrix()));
}
- target->initDraw(gp, this->pipeline());
+ target->initDraw(gp);
size_t vertexStride = gp->getVertexStride();
@@ -144,7 +144,7 @@ private:
SkPoint* vertex = reinterpret_cast<SkPoint*>(verts);
GrPrimitiveType primType;
- if (args.fStrokeWidth > 0) {;
+ if (args.fStrokeWidth > 0) {
primType = kTriangleStrip_GrPrimitiveType;
init_stroke_rect_strip(vertex, args.fRect, args.fStrokeWidth);
} else {
@@ -157,9 +157,9 @@ private:
vertex[4].set(args.fRect.fLeft, args.fRect.fTop);
}
- GrVertices vertices;
- vertices.init(primType, vertexBuffer, firstVertex, vertexCount);
- target->draw(vertices);
+ GrMesh mesh;
+ mesh.init(primType, vertexBuffer, firstVertex, vertexCount);
+ target->draw(mesh);
}
void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
« no previous file with comments | « src/gpu/batches/GrNinePatch.cpp ('k') | src/gpu/batches/GrPLSPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698