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

Unified Diff: src/gpu/batches/GrTessellatingPathRenderer.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/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 06f31cd8db7147fcb542524cfe16768baa9c36c1..23c3fcfa4fb95a59be4b5d2bddb5cf96608df56e 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -228,13 +228,14 @@ private:
void drawVertices(Target* target, const GrGeometryProcessor* gp, const GrVertexBuffer* vb,
int firstVertex, int count) const {
- target->initDraw(gp, this->pipeline());
SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
GrPrimitiveType primitiveType = TESSELLATOR_WIREFRAME ? kLines_GrPrimitiveType
: kTriangles_GrPrimitiveType;
+ target->initDraw(gp, primitiveType);
+
GrVertices vertices;
- vertices.init(primitiveType, vb, firstVertex, count);
+ vertices.init(vb, firstVertex, count);
target->draw(vertices);
}

Powered by Google App Engine
This is Rietveld 408576698