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

Unified Diff: src/gpu/batches/GrAADistanceFieldPathRenderer.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: nit 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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/batches/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
index 4948d29f634cdfc664676f7934de8d8b5f64a4e3..7e96b86550981e262f109c4c61c6c994b68a2bf0 100644
--- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
@@ -209,7 +209,7 @@ private:
flags,
this->usesLocalCoords()));
- target->initDraw(dfProcessor, this->pipeline());
+ target->initDraw(dfProcessor);
FlushInfo flushInfo;
@@ -407,7 +407,7 @@ private:
&atlasLocation);
if (!success) {
this->flush(target, flushInfo);
- target->initDraw(dfProcessor, pipeline);
+ target->initDraw(dfProcessor);
SkDEBUGCODE(success =) atlas->addToAtlas(&id, target, width, height,
dfStorage.get(), &atlasLocation);
@@ -491,12 +491,12 @@ private:
}
void flush(GrVertexBatch::Target* target, FlushInfo* flushInfo) const {
- GrVertices vertices;
+ GrMesh mesh;
int maxInstancesPerDraw = flushInfo->fIndexBuffer->maxQuads();
- vertices.initInstanced(kTriangles_GrPrimitiveType, flushInfo->fVertexBuffer,
+ mesh.initInstanced(kTriangles_GrPrimitiveType, flushInfo->fVertexBuffer,
flushInfo->fIndexBuffer, flushInfo->fVertexOffset, kVerticesPerQuad,
kIndicesPerQuad, flushInfo->fInstancesToFlush, maxInstancesPerDraw);
- target->draw(vertices);
+ target->draw(mesh);
flushInfo->fVertexOffset += kVerticesPerQuad * flushInfo->fInstancesToFlush;
flushInfo->fInstancesToFlush = 0;
}
« no previous file with comments | « src/gpu/batches/GrAAConvexPathRenderer.cpp ('k') | src/gpu/batches/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698