Debian Codegraph @

src/gpu/ganesh/ops/GrOvalOpFactory.h

raw
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 #ifndef GrOvalOpFactory_DEFINED
8 #define GrOvalOpFactory_DEFINED
9
10 #include "include/core/SkTypes.h"
11
12 #if !defined(SK_ENABLE_OPTIMIZE_SIZE)
13
14 #include "include/core/SkScalar.h"
15 #include "src/gpu/ganesh/ops/GrOp.h"
16
17 class GrPaint;
18 class GrRecordingContext;
19 class GrStyle;
20 class SkMatrix;
21 class SkRRect;
22 class SkStrokeRec;
23 struct GrShaderCaps;
24 struct SkRect;
25
26 /*
27 * This namespace wraps helper functions that draw ovals, rrects, and arcs (filled & stroked)
28 */
29 class GrOvalOpFactory {
30 public:
31 static GrOp::Owner MakeCircleOp(GrRecordingContext*,
32 GrPaint&&,
33 const SkMatrix&,
34 const SkRect& oval,
35 const GrStyle& style,
36 const GrShaderCaps*);
37
38 static GrOp::Owner MakeOvalOp(GrRecordingContext*,
39 GrPaint&&,
40 const SkMatrix&,
41 const SkRect& oval,
42 const GrStyle& style,
43 const GrShaderCaps*);
44
45 static GrOp::Owner MakeCircularRRectOp(GrRecordingContext*,
46 GrPaint&&,
47 const SkMatrix&,
48 const SkRRect&,
49 const SkStrokeRec&,
50 const GrShaderCaps*);
51
52 static GrOp::Owner MakeRRectOp(GrRecordingContext*,
53 GrPaint&&,
54 const SkMatrix&,
55 const SkRRect&,
56 const SkStrokeRec&,
57 const GrShaderCaps*);
58
59 static GrOp::Owner MakeArcOp(GrRecordingContext*,
60 GrPaint&&,
61 const SkMatrix&,
62 const SkRect& oval,
63 SkScalar startAngle,
64 SkScalar sweepAngle,
65 bool useCenter,
66 const GrStyle&,
67 const GrShaderCaps*);
68 };
69
70 #endif // !defined(SK_ENABLE_OPTIMIZE_SIZE)
71
72 #endif // GrOvalOpFactory_DEFINED