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

Unified Diff: src/gpu/batches/GrDefaultPathRenderer.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/GrAtlasTextBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index a5862c678f806c014deeaddb1d3400de3e8ee444..acaff173c6a37f5ada5cd03a5c6d3bf7146927a9 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -11,9 +11,9 @@
#include "GrBatchTest.h"
#include "GrContext.h"
#include "GrDefaultGeoProcFactory.h"
+#include "GrMesh.h"
#include "GrPathUtils.h"
#include "GrPipelineBuilder.h"
-#include "GrVertices.h"
#include "SkGeometry.h"
#include "SkString.h"
#include "SkStrokeRec.h"
@@ -269,7 +269,7 @@ private:
size_t vertexStride = gp->getVertexStride();
SkASSERT(vertexStride == sizeof(SkPoint));
- target->initDraw(gp, this->pipeline());
+ target->initDraw(gp);
int instanceCount = fGeoData.count();
@@ -362,14 +362,14 @@ private:
SkASSERT(vertexOffset <= maxVertices && indexOffset <= maxIndices);
}
- GrVertices vertices;
+ GrMesh mesh;
if (isIndexed) {
- vertices.initIndexed(primitiveType, vertexBuffer, indexBuffer, firstVertex, firstIndex,
- vertexOffset, indexOffset);
+ mesh.initIndexed(primitiveType, vertexBuffer, indexBuffer, firstVertex, firstIndex,
+ vertexOffset, indexOffset);
} else {
- vertices.init(primitiveType, vertexBuffer, firstVertex, vertexOffset);
+ mesh.init(primitiveType, vertexBuffer, firstVertex, vertexOffset);
}
- target->draw(vertices);
+ target->draw(mesh);
// put back reserves
target->putBackIndices((size_t)(maxIndices - indexOffset));
« no previous file with comments | « src/gpu/batches/GrAtlasTextBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698