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

Unified Diff: gm/beziereffects.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 | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/beziereffects.cpp
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index a53ac0e96a1c67673e601dd7e0d696977f1e7b6a..2636f26001352eac1d843ee880f2be2ef244c0fa 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -12,7 +12,7 @@
#if SK_SUPPORT_GPU
-#include "GrBatchTarget.h"
+#include "GrBatchFlushState.h"
#include "GrContext.h"
#include "GrPathUtils.h"
#include "GrTest.h"
@@ -71,11 +71,11 @@ private:
return &fGeometry;
}
- void onGenerateGeometry(GrBatchTarget* batchTarget) override {
+ void generateGeometry(Target* target) override {
QuadHelper helper;
size_t vertexStride = this->geometryProcessor()->getVertexStride();
SkASSERT(vertexStride == sizeof(Vertex));
- Vertex* verts = reinterpret_cast<Vertex*>(helper.init(batchTarget, vertexStride, 1));
+ Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStride, 1));
if (!verts) {
return;
}
@@ -88,7 +88,7 @@ private:
verts[v].fKLM[1] = eval_line(verts[v].fPosition, fKlmEqs + 3, fSign);
verts[v].fKLM[2] = eval_line(verts[v].fPosition, fKlmEqs + 6, 1.f);
}
- helper.issueDraw(batchTarget);
+ helper.recordDraw(target);
}
Geometry fGeometry;
@@ -467,11 +467,11 @@ private:
return &fGeometry;
}
- void onGenerateGeometry(GrBatchTarget* batchTarget) override {
+ void generateGeometry(Target* target) override {
QuadHelper helper;
size_t vertexStride = this->geometryProcessor()->getVertexStride();
SkASSERT(vertexStride == sizeof(Vertex));
- Vertex* verts = reinterpret_cast<Vertex*>(helper.init(batchTarget, vertexStride, 1));
+ Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStride, 1));
if (!verts) {
return;
}
@@ -479,7 +479,7 @@ private:
fGeometry.fBounds.fRight, fGeometry.fBounds.fBottom,
sizeof(Vertex));
fDevToUV.apply<4, sizeof(Vertex), sizeof(SkPoint)>(verts);
- helper.issueDraw(batchTarget);
+ helper.recordDraw(target);
}
Geometry fGeometry;
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698