OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrOvalRenderer_DEFINED | 8 #ifndef GrOvalRenderer_DEFINED |
9 #define GrOvalRenderer_DEFINED | 9 #define GrOvalRenderer_DEFINED |
10 | 10 |
11 #include "GrPaint.h" | 11 #include "GrColor.h" |
12 | 12 |
13 class GrDrawBatch; | 13 class GrDrawBatch; |
14 class GrPipelineBuilder; | |
15 class GrShaderCaps; | 14 class GrShaderCaps; |
| 15 class SkMatrix; |
16 struct SkRect; | 16 struct SkRect; |
| 17 class SkRRect; |
17 class SkStrokeRec; | 18 class SkStrokeRec; |
18 | 19 |
19 /* | 20 /* |
20 * This class wraps helper functions that draw ovals and roundrects (filled & st
roked) | 21 * This class wraps helper functions that draw ovals and roundrects (filled & st
roked) |
21 */ | 22 */ |
22 class GrOvalRenderer { | 23 class GrOvalRenderer { |
23 public: | 24 public: |
24 static GrDrawBatch* CreateOvalBatch(const GrPipelineBuilder&, | 25 static GrDrawBatch* CreateOvalBatch(GrColor, |
25 GrColor, | |
26 const SkMatrix& viewMatrix, | 26 const SkMatrix& viewMatrix, |
27 bool useAA, | |
28 const SkRect& oval, | 27 const SkRect& oval, |
29 const SkStrokeRec& stroke, | 28 const SkStrokeRec& stroke, |
30 GrShaderCaps* shaderCaps); | 29 GrShaderCaps* shaderCaps); |
31 static GrDrawBatch* CreateRRectBatch(const GrPipelineBuilder&, | 30 static GrDrawBatch* CreateRRectBatch(GrColor, |
32 GrColor, | |
33 const SkMatrix& viewMatrix, | 31 const SkMatrix& viewMatrix, |
34 bool useAA, | |
35 const SkRRect& rrect, | 32 const SkRRect& rrect, |
36 const SkStrokeRec& stroke, | 33 const SkStrokeRec& stroke, |
37 GrShaderCaps* shaderCaps); | 34 GrShaderCaps* shaderCaps); |
38 | 35 |
39 private: | 36 private: |
40 GrOvalRenderer(); | 37 GrOvalRenderer(); |
41 | 38 |
42 static GrDrawBatch* CreateEllipseBatch(GrColor, | 39 static GrDrawBatch* CreateEllipseBatch(GrColor, |
43 const SkMatrix& viewMatrix, | 40 const SkMatrix& viewMatrix, |
44 const SkRect& ellipse, | 41 const SkRect& ellipse, |
45 const SkStrokeRec& stroke); | 42 const SkStrokeRec& stroke); |
46 static GrDrawBatch* CreateDIEllipseBatch(GrColor, | 43 static GrDrawBatch* CreateDIEllipseBatch(GrColor, |
47 const SkMatrix& viewMatrix, | 44 const SkMatrix& viewMatrix, |
48 const SkRect& ellipse, | 45 const SkRect& ellipse, |
49 const SkStrokeRec& stroke); | 46 const SkStrokeRec& stroke); |
50 static GrDrawBatch* CreateCircleBatch(GrColor, | 47 static GrDrawBatch* CreateCircleBatch(GrColor, |
51 const SkMatrix& viewMatrix, | 48 const SkMatrix& viewMatrix, |
52 const SkRect& circle, | 49 const SkRect& circle, |
53 const SkStrokeRec& stroke); | 50 const SkStrokeRec& stroke); |
54 }; | 51 }; |
55 | 52 |
56 #endif // GrOvalRenderer_DEFINED | 53 #endif // GrOvalRenderer_DEFINED |
OLD | NEW |