Chromium Code Reviews| Index: src/gpu/batches/GrRectBatchFactory.h |
| diff --git a/src/gpu/batches/GrRectBatchFactory.h b/src/gpu/batches/GrRectBatchFactory.h |
| index 4512f6a1f9bdf005d7d72a8ef4d98b7826ab8b00..bb16aeb8102568837667226a899068d5ba648ef4 100644 |
| --- a/src/gpu/batches/GrRectBatchFactory.h |
| +++ b/src/gpu/batches/GrRectBatchFactory.h |
| @@ -13,6 +13,8 @@ |
| #include "GrColor.h" |
| #include "GrNonAAFillRectBatch.h" |
| #include "GrNonAAStrokeRectBatch.h" |
| +#include "GrPaint.h" |
| +#include "GrAnalyticRectBatch.h" |
|
egdaniel
2016/08/12 18:33:11
alphabetize this
dvonbeck
2016/08/12 18:43:10
Done.
|
| #include "SkMatrix.h" |
| class GrBatch; |
| @@ -37,11 +39,17 @@ inline GrDrawBatch* CreateNonAAFill(GrColor color, |
| } |
| } |
| -inline GrDrawBatch* CreateAAFill(GrColor color, |
| +inline GrDrawBatch* CreateAAFill(GrPaint paint, |
|
egdaniel
2016/08/12 18:33:11
make this const ref for paint
dvonbeck
2016/08/12 18:43:09
Done.
|
| const SkMatrix& viewMatrix, |
| const SkRect& rect, |
| + const SkRect& croppedRect, |
| const SkRect& devRect) { |
| - return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect); |
| + if (!paint.usesDistanceVectorField()) { |
| + return GrAAFillRectBatch::Create(paint.getColor(), viewMatrix, croppedRect, devRect); |
| + } else { |
| + return GrAnalyticRectBatch::CreateAnalyticRectBatch(paint.getColor(), viewMatrix, rect, |
| + croppedRect, devRect); |
| + } |
| } |
| inline GrDrawBatch* CreateAAFill(GrColor color, |