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

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: add comments 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 ba19a0db85394a40095f5af516a483d2ff6c5d86..640cf2e59aa76942062b1ca2f0f6791fc42c6d98 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -793,8 +793,6 @@ private:
return;
}
- target->initDraw(gp);
-
size_t vertexStride = gp->getVertexStride();
SkASSERT(canTweakAlphaForCoverage ?
@@ -840,7 +838,7 @@ private:
vertexBuffer, indexBuffer,
firstVertex, firstIndex,
tess.numPts(), tess.numIndices());
- target->draw(mesh);
+ target->draw(gp, mesh);
}
}
@@ -864,8 +862,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];
@@ -930,7 +926,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