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

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: rebase 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/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index afeeda7ae61eefe802acf0efadf3f32918d5bed4..4770f7113123a26d04943778b0606f6e66072b27 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -25,7 +25,6 @@
#include "SkTypes.h"
GrVertices& GrVertices::operator =(const GrVertices& di) {
- fPrimitiveType = di.fPrimitiveType;
fStartVertex = di.fStartVertex;
fStartIndex = di.fStartIndex;
fVertexCount = di.fVertexCount;
@@ -492,17 +491,13 @@ 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,
+ GrPrimitiveType primitiveType,
+ const GrVertices* vertArray,
+ int drawCount) {
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, primitiveType, vertArray, drawCount);
}

Powered by Google App Engine
This is Rietveld 408576698