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

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: rebase 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
Index: src/gpu/batches/GrNonAAStrokeRectBatch.cpp
diff --git a/src/gpu/batches/GrNonAAStrokeRectBatch.cpp b/src/gpu/batches/GrNonAAStrokeRectBatch.cpp
index 6766de2e3b2370d5fe835f03133e9e31bdadc7fc..9b2954530e4cc3d875679479adf12991eecfc9a9 100644
--- a/src/gpu/batches/GrNonAAStrokeRectBatch.cpp
+++ b/src/gpu/batches/GrNonAAStrokeRectBatch.cpp
@@ -117,7 +117,6 @@ private:
this->viewMatrix()));
}
- target->initDraw(gp, this->pipeline());
size_t vertexStride = gp->getVertexStride();
@@ -144,7 +143,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,8 +156,9 @@ private:
vertex[4].set(args.fRect.fLeft, args.fRect.fTop);
}
+ target->initDraw(gp, primType);
GrVertices vertices;
- vertices.init(primType, vertexBuffer, firstVertex, vertexCount);
+ vertices.init(vertexBuffer, firstVertex, vertexCount);
target->draw(vertices);
}

Powered by Google App Engine
This is Rietveld 408576698