commit-bot@chromium.org | 8131283 | 2013-03-22 18:34:09 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
commit-bot@chromium.org | 8131283 | 2013-03-22 18:34:09 +0000 | [diff] [blame] | 8 | #ifndef GrOvalRenderer_DEFINED |
| 9 | #define GrOvalRenderer_DEFINED |
| 10 | |
robertphillips | b56f927 | 2016-02-25 11:03:52 -0800 | [diff] [blame] | 11 | #include "GrColor.h" |
commit-bot@chromium.org | 8131283 | 2013-03-22 18:34:09 +0000 | [diff] [blame] | 12 | |
robertphillips | 0cc2f85 | 2016-02-24 13:36:56 -0800 | [diff] [blame] | 13 | class GrDrawBatch; |
robertphillips | 0cc2f85 | 2016-02-24 13:36:56 -0800 | [diff] [blame] | 14 | class GrShaderCaps; |
bsalomon | 4f3a0ca | 2016-08-22 13:14:26 -0700 | [diff] [blame] | 15 | class GrStyle; |
robertphillips | b56f927 | 2016-02-25 11:03:52 -0800 | [diff] [blame] | 16 | class SkMatrix; |
commit-bot@chromium.org | fd03d4a | 2013-07-17 21:39:42 +0000 | [diff] [blame] | 17 | struct SkRect; |
robertphillips | b56f927 | 2016-02-25 11:03:52 -0800 | [diff] [blame] | 18 | class SkRRect; |
commit-bot@chromium.org | 8131283 | 2013-03-22 18:34:09 +0000 | [diff] [blame] | 19 | class SkStrokeRec; |
| 20 | |
| 21 | /* |
commit-bot@chromium.org | f2bfd54 | 2013-04-25 15:27:00 +0000 | [diff] [blame] | 22 | * This class wraps helper functions that draw ovals and roundrects (filled & stroked) |
commit-bot@chromium.org | 8131283 | 2013-03-22 18:34:09 +0000 | [diff] [blame] | 23 | */ |
robertphillips | ea46150 | 2015-05-26 11:38:03 -0700 | [diff] [blame] | 24 | class GrOvalRenderer { |
commit-bot@chromium.org | 8131283 | 2013-03-22 18:34:09 +0000 | [diff] [blame] | 25 | public: |
robertphillips | b56f927 | 2016-02-25 11:03:52 -0800 | [diff] [blame] | 26 | static GrDrawBatch* CreateOvalBatch(GrColor, |
robertphillips | 0cc2f85 | 2016-02-24 13:36:56 -0800 | [diff] [blame] | 27 | const SkMatrix& viewMatrix, |
robertphillips | 0cc2f85 | 2016-02-24 13:36:56 -0800 | [diff] [blame] | 28 | const SkRect& oval, |
| 29 | const SkStrokeRec& stroke, |
bsalomon | 4f3a0ca | 2016-08-22 13:14:26 -0700 | [diff] [blame] | 30 | const GrShaderCaps* shaderCaps); |
robertphillips | b56f927 | 2016-02-25 11:03:52 -0800 | [diff] [blame] | 31 | static GrDrawBatch* CreateRRectBatch(GrColor, |
robertphillips | 0cc2f85 | 2016-02-24 13:36:56 -0800 | [diff] [blame] | 32 | const SkMatrix& viewMatrix, |
robertphillips | 0cc2f85 | 2016-02-24 13:36:56 -0800 | [diff] [blame] | 33 | const SkRRect& rrect, |
| 34 | const SkStrokeRec& stroke, |
bsalomon | 4f3a0ca | 2016-08-22 13:14:26 -0700 | [diff] [blame] | 35 | const GrShaderCaps* shaderCaps); |
commit-bot@chromium.org | f2bfd54 | 2013-04-25 15:27:00 +0000 | [diff] [blame] | 36 | |
bsalomon | 4f3a0ca | 2016-08-22 13:14:26 -0700 | [diff] [blame] | 37 | static GrDrawBatch* CreateArcBatch(GrColor, |
| 38 | const SkMatrix& viewMatrix, |
| 39 | const SkRect& oval, |
| 40 | SkScalar startAngle, |
| 41 | SkScalar sweepAngle, |
| 42 | bool useCenter, |
| 43 | const GrStyle&, |
| 44 | const GrShaderCaps* shaderCaps); |
commit-bot@chromium.org | 8131283 | 2013-03-22 18:34:09 +0000 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | #endif // GrOvalRenderer_DEFINED |