Index: src/gpu/batches/GrRectBatchFactory.cpp |
diff --git a/src/gpu/batches/GrRectBatchFactory.cpp b/src/gpu/batches/GrRectBatchFactory.cpp |
index b41561209e1c19239d4f35a37aa7df34dc6bba82..e2597d2a66e2bfcc16cdd4fba59e529168b34abf 100644 |
--- a/src/gpu/batches/GrRectBatchFactory.cpp |
+++ b/src/gpu/batches/GrRectBatchFactory.cpp |
@@ -8,14 +8,15 @@ |
#include "GrRectBatchFactory.h" |
#include "GrRectBatch.h" |
+#include "GrStrokeRectBatch.h" |
namespace GrRectBatchFactory { |
-GrBatch* Create(GrColor color, |
- const SkMatrix& viewMatrix, |
- const SkRect& rect, |
- const SkRect* localRect, |
- const SkMatrix* localMatrix) { |
+GrBatch* CreateFillBW(GrColor color, |
+ const SkMatrix& viewMatrix, |
+ const SkRect& rect, |
+ const SkRect* localRect, |
+ const SkMatrix* localMatrix) { |
GrRectBatch::Geometry geometry; |
geometry.fColor = color; |
geometry.fViewMatrix = viewMatrix; |
@@ -38,4 +39,17 @@ GrBatch* Create(GrColor color, |
return GrRectBatch::Create(geometry); |
} |
+GrBatch* CreateStrokeBW(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); |
+} |
+ |
}; |