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

Unified Diff: src/gpu/batches/GrRectBatchFactory.cpp

Issue 1353683003: Move StrokeRectBatches into .cpp files (Closed) Base URL: https://skia.googlesource.com/skia.git@statics
Patch Set: tweaks Created 5 years, 3 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 f01010b21b54e35b7460c92fa48c8cb1f61d7e86..eed18ad419637e788065495cf2729ae748fb6fa1 100644
--- a/src/gpu/batches/GrRectBatchFactory.cpp
+++ b/src/gpu/batches/GrRectBatchFactory.cpp
@@ -8,41 +8,11 @@
#include "GrRectBatchFactory.h"
#include "GrAAStrokeRectBatch.h"
-#include "GrStrokeRectBatch.h"
#include "SkStrokeRec.h"
-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;
- geometry.fDevOutsideAssist = devOutsideAssist;
- geometry.fDevInside = devInside;
- geometry.fMiterStroke = miterStroke;
-
- return GrAAStrokeRectBatch::Create(geometry, viewMatrix);
-}
-
namespace GrRectBatchFactory {
-GrDrawBatch* CreateNonAAStroke(GrColor color,
- const SkMatrix& viewMatrix,
- const SkRect& rect,
- SkScalar strokeWidth,
- bool snapToPixelCenters) {
- GrStrokeRectBatch::Geometry geometry;
- geometry.fColor = color;
- geometry.fViewMatrix = viewMatrix;
- geometry.fRect = rect;
- geometry.fStrokeWidth = strokeWidth;
- return GrStrokeRectBatch::Create(geometry, snapToPixelCenters);
-}
-
GrDrawBatch* CreateAAStroke(GrColor color,
const SkMatrix& viewMatrix,
const SkRect& rect,
@@ -98,8 +68,8 @@ GrDrawBatch* CreateAAStroke(GrColor color,
devOutsideAssist.outset(0, ry);
}
- return create_stroke_aa_batch(color, viewMatrix, devOutside, devOutsideAssist, devInside,
- miterStroke);
+ return GrAAStrokeRectBatch::Create(color, viewMatrix, devOutside, devOutsideAssist, devInside,
+ miterStroke);
}
GrDrawBatch* CreateAAFillNestedRects(GrColor color,
@@ -116,7 +86,7 @@ GrDrawBatch* CreateAAFillNestedRects(GrColor color,
return CreateAAFill(color, viewMatrix, devOutside, devOutside);
}
- return create_stroke_aa_batch(color, viewMatrix, devOutside, devOutside, devInside, true);
+ return GrAAStrokeRectBatch::Create(color, viewMatrix, devOutside, devOutside, devInside, true);
}
};
« 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