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

Unified Diff: src/gpu/GrOvalRenderer.cpp

Issue 1835283002: Simplify GrDrawBatch uploads and token uage. (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
« no previous file with comments | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/batches/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index 605ad6e77a6a9e76f61c9eb5cc09b78e0c39ae85..2accbf67ae26bb8f5b20c6180a2f486713ce0142 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -607,8 +607,6 @@ private:
// Setup geometry processor
SkAutoTUnref<GrGeometryProcessor> gp(new CircleGeometryProcessor(fStroked, localMatrix));
- target->initDraw(gp);
-
int instanceCount = fGeoData.count();
size_t vertexStride = gp->getVertexStride();
SkASSERT(vertexStride == sizeof(CircleVertex));
@@ -656,7 +654,7 @@ private:
verts += kVerticesPerQuad;
}
- helper.recordDraw(target);
+ helper.recordDraw(target, gp);
}
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
@@ -793,8 +791,6 @@ private:
// Setup geometry processor
SkAutoTUnref<GrGeometryProcessor> gp(new EllipseGeometryProcessor(fStroked, localMatrix));
- target->initDraw(gp);
-
int instanceCount = fGeoData.count();
QuadHelper helper;
size_t vertexStride = gp->getVertexStride();
@@ -847,7 +843,7 @@ private:
verts += kVerticesPerQuad;
}
- helper.recordDraw(target);
+ helper.recordDraw(target, gp);
}
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
@@ -1011,8 +1007,6 @@ private:
SkAutoTUnref<GrGeometryProcessor> gp(new DIEllipseGeometryProcessor(this->viewMatrix(),
this->style()));
- target->initDraw(gp);
-
int instanceCount = fGeoData.count();
size_t vertexStride = gp->getVertexStride();
SkASSERT(vertexStride == sizeof(DIEllipseVertex));
@@ -1061,7 +1055,7 @@ private:
verts += kVerticesPerQuad;
}
- helper.recordDraw(target);
+ helper.recordDraw(target, gp);
}
DIEllipseBatch(const Geometry& geometry, const SkRect& bounds) : INHERITED(ClassID()) {
@@ -1278,8 +1272,6 @@ private:
// Setup geometry processor
SkAutoTUnref<GrGeometryProcessor> gp(new CircleGeometryProcessor(fStroked, localMatrix));
- target->initDraw(gp);
-
int instanceCount = fGeoData.count();
size_t vertexStride = gp->getVertexStride();
SkASSERT(vertexStride == sizeof(CircleVertex));
@@ -1347,7 +1339,7 @@ private:
}
}
- helper.recordDraw(target);
+ helper.recordDraw(target, gp);
}
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
@@ -1426,8 +1418,6 @@ private:
// Setup geometry processor
SkAutoTUnref<GrGeometryProcessor> gp(new EllipseGeometryProcessor(fStroked, localMatrix));
- target->initDraw(gp);
-
int instanceCount = fGeoData.count();
size_t vertexStride = gp->getVertexStride();
SkASSERT(vertexStride == sizeof(EllipseVertex));
@@ -1506,7 +1496,7 @@ private:
verts++;
}
}
- helper.recordDraw(target);
+ helper.recordDraw(target, gp);
}
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override {
« no previous file with comments | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/batches/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698