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

Unified Diff: src/gpu/GrGpu.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/GrGpu.h ('k') | src/gpu/GrMesh.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index afeeda7ae61eefe802acf0efadf3f32918d5bed4..dd4060fe80614037c119634c48d670d0cd29143b 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -12,6 +12,7 @@
#include "GrContext.h"
#include "GrGpuResourcePriv.h"
#include "GrIndexBuffer.h"
+#include "GrMesh.h"
#include "GrPathRendering.h"
#include "GrPipeline.h"
#include "GrResourceCache.h"
@@ -21,10 +22,9 @@
#include "GrSurfacePriv.h"
#include "GrTransferBuffer.h"
#include "GrVertexBuffer.h"
-#include "GrVertices.h"
#include "SkTypes.h"
-GrVertices& GrVertices::operator =(const GrVertices& di) {
+GrMesh& GrMesh::operator =(const GrMesh& di) {
fPrimitiveType = di.fPrimitiveType;
fStartVertex = di.fStartVertex;
fStartIndex = di.fStartIndex;
@@ -492,17 +492,12 @@ const GrGpu::MultisampleSpecs& GrGpu::getMultisampleSpecs(GrRenderTarget* rt,
////////////////////////////////////////////////////////////////////////////////
-void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) {
+void GrGpu::draw(const GrPipeline& pipeline,
+ const GrPrimitiveProcessor& primProc,
+ const GrMesh* meshes,
+ int meshCount) {
this->handleDirtyContext();
- if (GrXferBarrierType barrierType = args.fPipeline->xferBarrierType(*this->caps())) {
- this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType);
- }
- GrVertices::Iterator iter;
- const GrNonInstancedVertices* verts = iter.init(vertices);
- do {
- this->onDraw(args, *verts);
- fStats.incNumDraws();
- } while ((verts = iter.next()));
+ this->onDraw(pipeline, primProc, meshes, meshCount);
}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrMesh.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698