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

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

Issue 1835283002: Simplify GrDrawBatch uploads and token uage. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments updated 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/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index 51c1c55837abdeb1b2b22c8a040cb1b6fa3e2951..8c55de7e79cc79d202992a03355c0cecb4a49e78 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -792,8 +792,6 @@ private:
return;
}
- target->initDraw(gp);
-
size_t vertexStride = gp->getVertexStride();
SkASSERT(canTweakAlphaForCoverage ?
@@ -839,7 +837,7 @@ private:
vertexBuffer, indexBuffer,
firstVertex, firstIndex,
tess.numPts(), tess.numIndices());
- target->draw(mesh);
+ target->draw(gp, mesh);
}
}
@@ -863,8 +861,6 @@ private:
SkAutoTUnref<GrGeometryProcessor> quadProcessor(
QuadEdgeEffect::Create(this->color(), invert, this->usesLocalCoords()));
- target->initDraw(quadProcessor);
-
// TODO generate all segments for all paths and use one vertex buffer
for (int i = 0; i < instanceCount; i++) {
const Geometry& args = fGeoData[i];
@@ -929,7 +925,7 @@ private:
const Draw& draw = draws[j];
mesh.initIndexed(kTriangles_GrPrimitiveType, vertexBuffer, indexBuffer,
firstVertex, firstIndex, draw.fVertexCnt, draw.fIndexCnt);
- target->draw(mesh);
+ target->draw(quadProcessor, mesh);
firstVertex += draw.fVertexCnt;
firstIndex += draw.fIndexCnt;
}

Powered by Google App Engine
This is Rietveld 408576698