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 "GrAAFillRectBatch.h" | 11 #include "GrAAFillRectBatch.h" |
12 #include "GrBWFillRectBatch.h" | |
13 #include "GrColor.h" | 12 #include "GrColor.h" |
| 13 #include "GrNonAAFillRectBatch.h" |
14 | 14 |
15 class GrBatch; | 15 class GrBatch; |
16 class SkMatrix; | 16 class SkMatrix; |
17 struct SkRect; | 17 struct SkRect; |
18 class SkStrokeRec; | 18 class SkStrokeRec; |
19 | 19 |
20 /* | 20 /* |
21 * A factory for returning batches which can draw rectangles. | 21 * A factory for returning batches which can draw rectangles. |
22 */ | 22 */ |
23 namespace GrRectBatchFactory { | 23 namespace GrRectBatchFactory { |
24 | 24 |
25 inline GrDrawBatch* CreateNonAAFill(GrColor color, | 25 inline GrDrawBatch* CreateNonAAFill(GrColor color, |
26 const SkMatrix& viewMatrix, | 26 const SkMatrix& viewMatrix, |
27 const SkRect& rect, | 27 const SkRect& rect, |
28 const SkRect* localRect, | 28 const SkRect* localRect, |
29 const SkMatrix* localMatrix) { | 29 const SkMatrix* localMatrix) { |
30 return GrBWFillRectBatch::Create(color, viewMatrix, rect, localRect, localMa
trix); | 30 return GrNonAAFillRectBatch::Create(color, viewMatrix, rect, localRect, loca
lMatrix); |
31 } | 31 } |
32 | 32 |
33 inline GrDrawBatch* CreateAAFill(GrColor color, | 33 inline GrDrawBatch* CreateAAFill(GrColor color, |
34 const SkMatrix& viewMatrix, | 34 const SkMatrix& viewMatrix, |
35 const SkRect& rect, | 35 const SkRect& rect, |
36 const SkRect& devRect) { | 36 const SkRect& devRect) { |
37 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect); | 37 return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect); |
38 } | 38 } |
39 | 39 |
40 inline GrDrawBatch* CreateAAFill(GrColor color, | 40 inline GrDrawBatch* CreateAAFill(GrColor color, |
(...skipping 17 matching lines...) Expand all Loading... |
58 const SkStrokeRec& stroke); | 58 const SkStrokeRec& stroke); |
59 | 59 |
60 // First rect is outer; second rect is inner | 60 // First rect is outer; second rect is inner |
61 GrDrawBatch* CreateAAFillNestedRects(GrColor, | 61 GrDrawBatch* CreateAAFillNestedRects(GrColor, |
62 const SkMatrix& viewMatrix, | 62 const SkMatrix& viewMatrix, |
63 const SkRect rects[2]); | 63 const SkRect rects[2]); |
64 | 64 |
65 }; | 65 }; |
66 | 66 |
67 #endif | 67 #endif |
OLD | NEW |