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

Unified Diff: src/gpu/batches/GrDrawVerticesBatch.cpp

Issue 1835283002: Simplify GrDrawBatch uploads and token uage. (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
« no previous file with comments | « src/gpu/batches/GrDrawBatch.h ('k') | src/gpu/batches/GrNinePatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawVerticesBatch.cpp
diff --git a/src/gpu/batches/GrDrawVerticesBatch.cpp b/src/gpu/batches/GrDrawVerticesBatch.cpp
index d3c9f5e32f4a1e2df7d2b4791e3df690bddc67e9..12ea05a74744579e7c9a11f01c21c72d28c41622 100644
--- a/src/gpu/batches/GrDrawVerticesBatch.cpp
+++ b/src/gpu/batches/GrDrawVerticesBatch.cpp
@@ -97,8 +97,6 @@ void GrDrawVerticesBatch::onPrepareDraws(Target* target) const {
SkAutoTUnref<const GrGeometryProcessor> gp(
set_vertex_attributes(hasLocalCoords, &colorOffset, &texOffset, fViewMatrix,
fCoverageIgnored));
- target->initDraw(gp);
-
size_t vertexStride = gp->getVertexStride();
SkASSERT(vertexStride == sizeof(SkPoint) + (hasLocalCoords ? sizeof(SkPoint) : 0)
@@ -164,7 +162,7 @@ void GrDrawVerticesBatch::onPrepareDraws(Target* target) const {
} else {
mesh.init(this->primitiveType(), vertexBuffer, firstVertex, fVertexCount);
}
- target->draw(mesh);
+ target->draw(gp, mesh);
}
bool GrDrawVerticesBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) {
« no previous file with comments | « src/gpu/batches/GrDrawBatch.h ('k') | src/gpu/batches/GrNinePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698