Make GrVertexBatch objects hold their own draws during GrDrawTarget flush
NO_MERGE_BUILDS
Review URL: https://codereview.chromium.org/1286043004
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index e9b417f..30471a79 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -12,7 +12,7 @@
#if SK_SUPPORT_GPU
-#include "GrBatchTarget.h"
+#include "GrBatchFlushState.h"
#include "GrContext.h"
#include "GrDefaultGeoProcFactory.h"
#include "GrPathUtils.h"
@@ -58,11 +58,11 @@
return &fGeometry;
}
- void onGenerateGeometry(GrBatchTarget* batchTarget) override {
+ void generateGeometry(Target* target) override {
size_t vertexStride = this->geometryProcessor()->getVertexStride();
SkASSERT(vertexStride == sizeof(SkPoint));
QuadHelper helper;
- SkPoint* verts = reinterpret_cast<SkPoint*>(helper.init(batchTarget, vertexStride, 1));
+ SkPoint* verts = reinterpret_cast<SkPoint*>(helper.init(target, vertexStride, 1));
if (!verts) {
return;
}
@@ -72,7 +72,7 @@
fGeometry.fBounds.outset(5.f, 5.f);
fGeometry.fBounds.toQuad(verts);
- helper.issueDraw(batchTarget);
+ helper.recordDraw(target);
}
Geometry fGeometry;