| 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 "GrColor.h" | 11 #include "GrColor.h" |
| 12 | 12 |
| 13 class GrDrawBatch; | 13 class GrDrawBatch; |
| 14 class GrShaderCaps; | 14 class GrShaderCaps; |
| 15 class GrStyle; |
| 15 class SkMatrix; | 16 class SkMatrix; |
| 16 struct SkRect; | 17 struct SkRect; |
| 17 class SkRRect; | 18 class SkRRect; |
| 18 class SkStrokeRec; | 19 class SkStrokeRec; |
| 19 | 20 |
| 20 /* | 21 /* |
| 21 * This class wraps helper functions that draw ovals and roundrects (filled & st
roked) | 22 * This class wraps helper functions that draw ovals and roundrects (filled & st
roked) |
| 22 */ | 23 */ |
| 23 class GrOvalRenderer { | 24 class GrOvalRenderer { |
| 24 public: | 25 public: |
| 25 static GrDrawBatch* CreateOvalBatch(GrColor, | 26 static GrDrawBatch* CreateOvalBatch(GrColor, |
| 26 const SkMatrix& viewMatrix, | 27 const SkMatrix& viewMatrix, |
| 27 const SkRect& oval, | 28 const SkRect& oval, |
| 28 const SkStrokeRec& stroke, | 29 const SkStrokeRec& stroke, |
| 29 GrShaderCaps* shaderCaps); | 30 const GrShaderCaps* shaderCaps); |
| 30 static GrDrawBatch* CreateRRectBatch(GrColor, | 31 static GrDrawBatch* CreateRRectBatch(GrColor, |
| 31 const SkMatrix& viewMatrix, | 32 const SkMatrix& viewMatrix, |
| 32 const SkRRect& rrect, | 33 const SkRRect& rrect, |
| 33 const SkStrokeRec& stroke, | 34 const SkStrokeRec& stroke, |
| 34 GrShaderCaps* shaderCaps); | 35 const GrShaderCaps* shaderCaps); |
| 35 | 36 |
| 36 private: | 37 static GrDrawBatch* CreateArcBatch(GrColor, |
| 37 GrOvalRenderer(); | 38 const SkMatrix& viewMatrix, |
| 39 const SkRect& oval, |
| 40 SkScalar startAngle, |
| 41 SkScalar sweepAngle, |
| 42 bool useCenter, |
| 43 const GrStyle&, |
| 44 const GrShaderCaps* shaderCaps); |
| 38 }; | 45 }; |
| 39 | 46 |
| 40 #endif // GrOvalRenderer_DEFINED | 47 #endif // GrOvalRenderer_DEFINED |
| OLD | NEW |