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

Unified Diff: src/gpu/batches/GrBWFillRectBatch.cpp

Issue 1286043004: Make GrVertexBatch objects hold their own draws during GrDrawTarget flush (Closed) Base URL: https://skia.googlesource.com/skia.git@m
Patch Set: forward decl Created 5 years, 4 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/GrAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrBWFillRectBatch.cpp
diff --git a/src/gpu/batches/GrBWFillRectBatch.cpp b/src/gpu/batches/GrBWFillRectBatch.cpp
index c0c93c7614ddd2fae6f23c68b290153961585278..f797e9ef4d39d166e55470792cbca2615344d0ce 100644
--- a/src/gpu/batches/GrBWFillRectBatch.cpp
+++ b/src/gpu/batches/GrBWFillRectBatch.cpp
@@ -7,13 +7,13 @@
#include "GrBWFillRectBatch.h"
-#include "GrBatchTarget.h"
+#include "GrBatchFlushState.h"
#include "GrColor.h"
#include "GrDefaultGeoProcFactory.h"
#include "GrPrimitiveProcessor.h"
#include "GrVertexBatch.h"
-class GrBatchTarget;
+class GrBatchFlushState;
class SkMatrix;
struct SkRect;
@@ -58,14 +58,14 @@ public:
fBatch.fCoverageIgnored = !init.readsCoverage();
}
- void generateGeometry(GrBatchTarget* batchTarget) override {
+ void onPrepareDraws(Target* target) override {
SkAutoTUnref<const GrGeometryProcessor> gp(this->createRectGP());
if (!gp) {
SkDebugf("Could not create GrGeometryProcessor\n");
return;
}
- batchTarget->initDraw(gp, this->pipeline());
+ target->initDraw(gp, this->pipeline());
int instanceCount = fGeoData.count();
size_t vertexStride = gp->getVertexStride();
@@ -73,7 +73,7 @@ public:
vertexStride == sizeof(GrDefaultGeoProcFactory::PositionColorLocalCoordAttr) :
vertexStride == sizeof(GrDefaultGeoProcFactory::PositionColorAttr));
QuadHelper helper;
- void* vertices = helper.init(batchTarget, vertexStride, instanceCount);
+ void* vertices = helper.init(target, vertexStride, instanceCount);
if (!vertices) {
return;
@@ -110,7 +110,7 @@ public:
}
}
- helper.issueDraw(batchTarget);
+ helper.recordDraw(target);
}
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
« no previous file with comments | « src/gpu/batches/GrAAStrokeRectBatch.cpp ('k') | src/gpu/batches/GrDrawAtlasBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698