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

Unified Diff: src/gpu/GrTessellatingPathRenderer.cpp

Issue 1293583002: Introduce GrBatch subclasses GrDrawBatch and GrVertexBatch to prepare for non-drawing batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove duplicated fields in GrVertexBatch 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/GrTargetCommands.cpp ('k') | src/gpu/batches/GrAAFillRectBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp
index 9459cc55d1ec3e69cef56f3cf8017569edf8c0b1..30be341e0edc13fb882fb47d7d328a52e950a694 100644
--- a/src/gpu/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/GrTessellatingPathRenderer.cpp
@@ -1384,14 +1384,14 @@ bool GrTessellatingPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) cons
!args.fAntiAlias && !args.fPath->isConvex();
}
-class TessellatingPathBatch : public GrBatch {
+class TessellatingPathBatch : public GrVertexBatch {
public:
- static GrBatch* Create(const GrColor& color,
- const SkPath& path,
- const GrStrokeInfo& stroke,
- const SkMatrix& viewMatrix,
- SkRect clipBounds) {
+ static GrDrawBatch* Create(const GrColor& color,
+ const SkPath& path,
+ const GrStrokeInfo& stroke,
+ const SkMatrix& viewMatrix,
+ SkRect clipBounds) {
return SkNEW_ARGS(TessellatingPathBatch, (color, path, stroke, viewMatrix, clipBounds));
}
@@ -1620,9 +1620,9 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
return false;
}
vmi.mapRect(&clipBounds);
- SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(args.fColor, *args.fPath,
- *args.fStroke, *args.fViewMatrix,
- clipBounds));
+ SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, *args.fPath,
+ *args.fStroke, *args.fViewMatrix,
+ clipBounds));
args.fTarget->drawBatch(*args.fPipelineBuilder, batch);
return true;
@@ -1632,7 +1632,7 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
#ifdef GR_TEST_UTILS
-BATCH_TEST_DEFINE(TesselatingPathBatch) {
+DRAW_BATCH_TEST_DEFINE(TesselatingPathBatch) {
GrColor color = GrRandomColor(random);
SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
SkPath path = GrTest::TestPath(random);
« no previous file with comments | « src/gpu/GrTargetCommands.cpp ('k') | src/gpu/batches/GrAAFillRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698