OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrBuiltInPathRenderer_DEFINED | 8 #ifndef GrBuiltInPathRenderer_DEFINED |
9 #define GrBuiltInPathRenderer_DEFINED | 9 #define GrBuiltInPathRenderer_DEFINED |
10 | 10 |
11 #include "GrPathRenderer.h" | 11 #include "GrPathRenderer.h" |
12 | 12 |
13 class GrContext; | 13 class GrContext; |
14 class GrGpu; | 14 class GrGpu; |
15 | 15 |
16 /** | 16 /** |
17 * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't
apply AA; it relies | 17 * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't
apply AA; it relies |
18 * on the target having MSAA if AA is desired. | 18 * on the target having MSAA if AA is desired. |
19 */ | 19 */ |
20 class GrStencilAndCoverPathRenderer : public GrPathRenderer { | 20 class GrStencilAndCoverPathRenderer : public GrPathRenderer { |
21 public: | 21 public: |
22 | 22 |
23 static GrPathRenderer* Create(GrResourceProvider*, const GrCaps&); | 23 static GrPathRenderer* Create(GrResourceProvider*, const GrCaps&); |
24 | 24 |
25 | 25 |
26 private: | 26 private: |
27 StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const
override { | 27 StencilSupport onGetStencilSupport(const SkPath&) const override { |
28 return GrPathRenderer::kStencilOnly_StencilSupport; | 28 return GrPathRenderer::kStencilOnly_StencilSupport; |
29 } | 29 } |
30 | 30 |
31 bool onCanDrawPath(const CanDrawPathArgs&) const override; | 31 bool onCanDrawPath(const CanDrawPathArgs&) const override; |
32 | 32 |
33 bool onDrawPath(const DrawPathArgs&) override; | 33 bool onDrawPath(const DrawPathArgs&) override; |
34 | 34 |
35 void onStencilPath(const StencilPathArgs&) override; | 35 void onStencilPath(const StencilPathArgs&) override; |
36 | 36 |
37 GrStencilAndCoverPathRenderer(GrResourceProvider*); | 37 GrStencilAndCoverPathRenderer(GrResourceProvider*); |
38 | 38 |
39 GrResourceProvider* fResourceProvider; | 39 GrResourceProvider* fResourceProvider; |
40 | 40 |
41 typedef GrPathRenderer INHERITED; | 41 typedef GrPathRenderer INHERITED; |
42 }; | 42 }; |
43 | 43 |
44 #endif | 44 #endif |
OLD | NEW |