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

Unified Diff: src/gpu/batches/GrRectBatchFactory.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/batches/GrRectBatchFactory.h ('k') | src/gpu/batches/GrStrokeRectBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrRectBatchFactory.cpp
diff --git a/src/gpu/batches/GrRectBatchFactory.cpp b/src/gpu/batches/GrRectBatchFactory.cpp
index e874acbb4919e64affdf04e6e67112e34cc899de..86980d2944d0f7f0bd9a1ac3c3c50096c5f6cf98 100644
--- a/src/gpu/batches/GrRectBatchFactory.cpp
+++ b/src/gpu/batches/GrRectBatchFactory.cpp
@@ -12,12 +12,12 @@
#include "SkStrokeRec.h"
-static GrBatch* create_stroke_aa_batch(GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect& devOutside,
- const SkRect& devOutsideAssist,
- const SkRect& devInside,
- bool miterStroke) {
+static GrDrawBatch* create_stroke_aa_batch(GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkRect& devOutside,
+ const SkRect& devOutsideAssist,
+ const SkRect& devInside,
+ bool miterStroke) {
GrAAStrokeRectBatch::Geometry geometry;
geometry.fColor = color;
geometry.fDevOutside = devOutside;
@@ -30,12 +30,11 @@ static GrBatch* create_stroke_aa_batch(GrColor color,
namespace GrRectBatchFactory {
-
-GrBatch* CreateStrokeBW(GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect& rect,
- SkScalar strokeWidth,
- bool snapToPixelCenters) {
+GrDrawBatch* CreateStrokeBW(GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkRect& rect,
+ SkScalar strokeWidth,
+ bool snapToPixelCenters) {
GrStrokeRectBatch::Geometry geometry;
geometry.fColor = color;
geometry.fViewMatrix = viewMatrix;
@@ -44,11 +43,11 @@ GrBatch* CreateStrokeBW(GrColor color,
return GrStrokeRectBatch::Create(geometry, snapToPixelCenters);
}
-GrBatch* CreateStrokeAA(GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect& rect,
- const SkRect& devRect,
- const SkStrokeRec& stroke) {
+GrDrawBatch* CreateStrokeAA(GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkRect& rect,
+ const SkRect& devRect,
+ const SkStrokeRec& stroke) {
SkVector devStrokeSize;
SkScalar width = stroke.getWidth();
if (width > 0) {
@@ -103,9 +102,9 @@ GrBatch* CreateStrokeAA(GrColor color,
miterStroke);
}
-GrBatch* CreateFillNestedRectsAA(GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect rects[2]) {
+GrDrawBatch* CreateFillNestedRectsAA(GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkRect rects[2]) {
SkASSERT(viewMatrix.rectStaysRect());
SkASSERT(!rects[0].isEmpty() && !rects[1].isEmpty());
« no previous file with comments | « src/gpu/batches/GrRectBatchFactory.h ('k') | src/gpu/batches/GrStrokeRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698