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 "GrAAStrokeRectBatch.h" |
12 #include "GrColor.h" | 13 #include "GrColor.h" |
13 #include "GrNonAAFillRectBatch.h" | 14 #include "GrNonAAFillRectBatch.h" |
14 #include "GrNonAAStrokeRectBatch.h" | 15 #include "GrNonAAStrokeRectBatch.h" |
15 #include "SkMatrix.h" | 16 #include "SkMatrix.h" |
16 | 17 |
17 class GrBatch; | 18 class GrBatch; |
18 struct SkRect; | 19 struct SkRect; |
19 class SkStrokeRec; | 20 class SkStrokeRec; |
20 | 21 |
21 /* | 22 /* |
(...skipping 30 matching lines...) Expand all Loading... |
52 } | 53 } |
53 | 54 |
54 inline GrDrawBatch* CreateNonAAStroke(GrColor color, | 55 inline GrDrawBatch* CreateNonAAStroke(GrColor color, |
55 const SkMatrix& viewMatrix, | 56 const SkMatrix& viewMatrix, |
56 const SkRect& rect, | 57 const SkRect& rect, |
57 SkScalar strokeWidth, | 58 SkScalar strokeWidth, |
58 bool snapToPixelCenters) { | 59 bool snapToPixelCenters) { |
59 return GrNonAAStrokeRectBatch::Create(color, viewMatrix, rect, strokeWidth,
snapToPixelCenters); | 60 return GrNonAAStrokeRectBatch::Create(color, viewMatrix, rect, strokeWidth,
snapToPixelCenters); |
60 } | 61 } |
61 | 62 |
62 GrDrawBatch* CreateAAStroke(GrColor, | 63 inline GrDrawBatch* CreateAAStroke(GrColor color, |
63 const SkMatrix& viewMatrix, | 64 const SkMatrix& viewMatrix, |
64 const SkRect& rect, | 65 const SkRect& rect, |
65 const SkRect& devRect, | 66 const SkStrokeRec& stroke) { |
66 const SkStrokeRec& stroke); | 67 return GrAAStrokeRectBatch::Create(color, viewMatrix, rect, stroke); |
| 68 } |
67 | 69 |
68 // First rect is outer; second rect is inner | 70 // First rect is outer; second rect is inner |
69 GrDrawBatch* CreateAAFillNestedRects(GrColor, | 71 GrDrawBatch* CreateAAFillNestedRects(GrColor, |
70 const SkMatrix& viewMatrix, | 72 const SkMatrix& viewMatrix, |
71 const SkRect rects[2]); | 73 const SkRect rects[2]); |
72 | 74 |
73 }; | 75 }; |
74 | 76 |
75 #endif | 77 #endif |
OLD | NEW |