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/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: 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/GrPLSPathRenderer.cpp
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index c94eb07aa1866f4f3209410c02811371672e3247..320b4ce03f74145852205747171ce53bce7b971d 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -885,9 +885,8 @@ 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());
+ grVertices.init(triVertexBuffer, firstTriVertex, triVertices.count());
+ target->initDraw(triangleProcessor, kTriangles_GrPrimitiveType);
target->draw(grVertices);
}
@@ -904,9 +903,8 @@ 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());
+ grVertices.init(quadVertexBuffer, firstQuadVertex, quadVertices.count());
+ target->initDraw(quadProcessor, kTriangles_GrPrimitiveType);
target->draw(grVertices);
}
@@ -933,9 +931,8 @@ 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());
+ grVertices.init(rectVertexBuffer, firstRectVertex, kRectVertexCount);
+ target->initDraw(finishProcessor, kTriangles_GrPrimitiveType);
target->draw(grVertices);
}
}

Powered by Google App Engine
This is Rietveld 408576698