OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrRectBatchFactory_DEFINED | 8 #ifndef GrRectBatchFactory_DEFINED |
9 #define GrRectBatchFactory_DEFINED | 9 #define GrRectBatchFactory_DEFINED |
10 | 10 |
11 #include "GrColor.h" | 11 #include "GrColor.h" |
12 | 12 |
13 class GrBatch; | 13 class GrBatch; |
14 class SkMatrix; | 14 class SkMatrix; |
15 struct SkRect; | 15 struct SkRect; |
| 16 class SkStrokeRec; |
16 | 17 |
17 /* | 18 /* |
18 * A factory for returning batches which can draw rectangles. Right now this on
ly handles non-AA | 19 * A factory for returning batches which can draw rectangles. |
19 * rects | |
20 */ | 20 */ |
21 namespace GrRectBatchFactory { | 21 namespace GrRectBatchFactory { |
22 | 22 |
23 GrBatch* CreateFillBW(GrColor color, | 23 GrBatch* CreateFillBW(GrColor color, |
24 const SkMatrix& viewMatrix, | 24 const SkMatrix& viewMatrix, |
25 const SkRect& rect, | 25 const SkRect& rect, |
26 const SkRect* localRect, | 26 const SkRect* localRect, |
27 const SkMatrix* localMatrix); | 27 const SkMatrix* localMatrix); |
28 | 28 |
| 29 GrBatch* CreateFillAA(GrColor color, |
| 30 const SkMatrix& viewMatrix, |
| 31 const SkRect& rect, |
| 32 const SkRect& devRect); |
| 33 |
29 GrBatch* CreateStrokeBW(GrColor color, | 34 GrBatch* CreateStrokeBW(GrColor color, |
30 const SkMatrix& viewMatrix, | 35 const SkMatrix& viewMatrix, |
31 const SkRect& rect, | 36 const SkRect& rect, |
32 SkScalar strokeWidth, | 37 SkScalar strokeWidth, |
33 bool snapToPixelCenters); | 38 bool snapToPixelCenters); |
34 | 39 |
| 40 GrBatch* CreateStrokeAA(GrColor, |
| 41 const SkMatrix& viewMatrix, |
| 42 const SkRect& rect, |
| 43 const SkRect& devRect, |
| 44 const SkStrokeRec& stroke); |
| 45 |
| 46 // First rect is outer; second rect is inner |
| 47 GrBatch* CreateFillNestedRectsAA(GrColor, |
| 48 const SkMatrix& viewMatrix, |
| 49 const SkRect rects[2]); |
| 50 |
35 }; | 51 }; |
36 | 52 |
37 #endif | 53 #endif |
OLD | NEW |