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

Unified Diff: src/gpu/batches/GrDrawVerticesBatch.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/GrDrawVerticesBatch.cpp
diff --git a/src/gpu/batches/GrDrawVerticesBatch.cpp b/src/gpu/batches/GrDrawVerticesBatch.cpp
index 156e4b349e4ad8a937758db7d29be890d0479593..79dc8c6179497f018b069250ade709ea3cc37447 100644
--- a/src/gpu/batches/GrDrawVerticesBatch.cpp
+++ b/src/gpu/batches/GrDrawVerticesBatch.cpp
@@ -97,7 +97,7 @@ void GrDrawVerticesBatch::onPrepareDraws(Target* target) const {
SkAutoTUnref<const GrGeometryProcessor> gp(
set_vertex_attributes(hasLocalCoords, &colorOffset, &texOffset, fViewMatrix,
fCoverageIgnored));
- target->initDraw(gp, this->pipeline());
+ target->initDraw(gp, this->primitiveType());
size_t vertexStride = gp->getVertexStride();
@@ -158,11 +158,11 @@ void GrDrawVerticesBatch::onPrepareDraws(Target* target) const {
GrVertices vertices;
if (indices) {
- vertices.initIndexed(this->primitiveType(), vertexBuffer, indexBuffer, firstVertex,
+ vertices.initIndexed(vertexBuffer, indexBuffer, firstVertex,
firstIndex, fVertexCount, fIndexCount);
} else {
- vertices.init(this->primitiveType(), vertexBuffer, firstVertex, fVertexCount);
+ vertices.init(vertexBuffer, firstVertex, fVertexCount);
}
target->draw(vertices);
}

Powered by Google App Engine
This is Rietveld 408576698