Chromium Code Reviews| Index: src/gpu/batches/GrRectBatchFactory.cpp |
| diff --git a/src/gpu/batches/GrRectBatchFactory.cpp b/src/gpu/batches/GrRectBatchFactory.cpp |
| index b41561209e1c19239d4f35a37aa7df34dc6bba82..efe7163aae9c21d4615bad245b7a863c959b8556 100644 |
| --- a/src/gpu/batches/GrRectBatchFactory.cpp |
| +++ b/src/gpu/batches/GrRectBatchFactory.cpp |
| @@ -8,10 +8,11 @@ |
| #include "GrRectBatchFactory.h" |
| #include "GrRectBatch.h" |
| +#include "GrStrokeRectBatch.h" |
| namespace GrRectBatchFactory { |
| -GrBatch* Create(GrColor color, |
| +GrBatch* CreateFillBW(GrColor color, |
|
robertphillips
2015/08/10 16:42:23
tab these over ?
|
| const SkMatrix& viewMatrix, |
| const SkRect& rect, |
| const SkRect* localRect, |
| @@ -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); |
| +} |
| + |
| }; |