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