OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrDefaultPathRenderer_DEFINED | 8 #ifndef GrDefaultPathRenderer_DEFINED |
9 #define GrDefaultPathRenderer_DEFINED | 9 #define GrDefaultPathRenderer_DEFINED |
10 | 10 |
11 #include "GrPathRenderer.h" | 11 #include "GrPathRenderer.h" |
12 #include "GrPathStencilSettings.h" | 12 #include "GrPathStencilSettings.h" |
13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
14 | 14 |
15 /** | 15 /** |
16 * Subclass that renders the path using the stencil buffer to resolve fill rule
s | 16 * Subclass that renders the path using the stencil buffer to resolve fill rule
s |
17 * (e.g. winding, even-odd) | 17 * (e.g. winding, even-odd) |
18 */ | 18 */ |
19 class SK_API GrDefaultPathRenderer : public GrPathRenderer { | 19 class SK_API GrDefaultPathRenderer : public GrPathRenderer { |
20 public: | 20 public: |
21 GrDefaultPathRenderer(bool separateStencilSupport, bool stencilWrapOpsSuppor
t); | 21 GrDefaultPathRenderer(bool separateStencilSupport, bool stencilWrapOpsSuppor
t); |
22 | 22 |
23 private: | 23 private: |
24 | 24 |
25 StencilSupport onGetStencilSupport(const SkPath&) const override; | 25 StencilSupport onGetStencilSupport(const GrShape&) const override; |
26 | 26 |
27 bool onCanDrawPath(const CanDrawPathArgs&) const override; | 27 bool onCanDrawPath(const CanDrawPathArgs&) const override; |
28 | 28 |
29 bool onDrawPath(const DrawPathArgs&) override; | 29 bool onDrawPath(const DrawPathArgs&) override; |
30 | 30 |
31 void onStencilPath(const StencilPathArgs&) override; | 31 void onStencilPath(const StencilPathArgs&) override; |
32 | 32 |
33 bool internalDrawPath(GrDrawContext*, | 33 bool internalDrawPath(GrDrawContext*, |
34 const GrPaint&, | 34 const GrPaint&, |
35 const GrUserStencilSettings*, | 35 const GrUserStencilSettings*, |
36 const GrClip&, | 36 const GrClip&, |
37 GrColor, | 37 GrColor, |
38 const SkMatrix& viewMatrix, | 38 const SkMatrix& viewMatrix, |
39 const SkPath&, | 39 const GrShape&, |
40 const GrStyle&, | |
41 bool stencilOnly); | 40 bool stencilOnly); |
42 | 41 |
43 bool fSeparateStencil; | 42 bool fSeparateStencil; |
44 bool fStencilWrapOps; | 43 bool fStencilWrapOps; |
45 | 44 |
46 typedef GrPathRenderer INHERITED; | 45 typedef GrPathRenderer INHERITED; |
47 }; | 46 }; |
48 | 47 |
49 #endif | 48 #endif |
OLD | NEW |