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

Unified Diff: src/gpu/batches/GrTessellatingPathRenderer.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/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 06f31cd8db7147fcb542524cfe16768baa9c36c1..c00e8ecbe69ee17148c1ca5fca521adf66b1bc3f 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -10,8 +10,8 @@
#include "GrBatchFlushState.h"
#include "GrBatchTest.h"
#include "GrDefaultGeoProcFactory.h"
+#include "GrMesh.h"
#include "GrPathUtils.h"
-#include "GrVertices.h"
#include "GrResourceCache.h"
#include "GrResourceProvider.h"
#include "GrTessellator.h"
@@ -228,14 +228,15 @@ private:
void drawVertices(Target* target, const GrGeometryProcessor* gp, const GrVertexBuffer* vb,
int firstVertex, int count) const {
- target->initDraw(gp, this->pipeline());
SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
GrPrimitiveType primitiveType = TESSELLATOR_WIREFRAME ? kLines_GrPrimitiveType
: kTriangles_GrPrimitiveType;
- GrVertices vertices;
- vertices.init(primitiveType, vb, firstVertex, count);
- target->draw(vertices);
+ target->initDraw(gp);
+
+ GrMesh mesh;
+ mesh.init(primitiveType, vb, firstVertex, count);
+ target->draw(mesh);
}
bool onCombineIfPossible(GrBatch*, const GrCaps&) override { return false; }
« no previous file with comments | « src/gpu/batches/GrTInstanceBatch.h ('k') | src/gpu/batches/GrTestBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698