OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef GrDashLinePathRenderer_DEFINED | 9 #ifndef GrDashLinePathRenderer_DEFINED |
10 #define GrDashLinePathRenderer_DEFINED | 10 #define GrDashLinePathRenderer_DEFINED |
11 | 11 |
12 #include "GrPathRenderer.h" | 12 #include "GrPathRenderer.h" |
13 | 13 |
14 class GrDashLinePathRenderer : public GrPathRenderer { | 14 class GrDashLinePathRenderer : public GrPathRenderer { |
15 public: | 15 public: |
16 GrDashLinePathRenderer(GrContext*); | |
17 ~GrDashLinePathRenderer(); | |
18 | |
19 bool canDrawPath(const GrDrawTarget*, | 16 bool canDrawPath(const GrDrawTarget*, |
20 const GrPipelineBuilder*, | 17 const GrPipelineBuilder*, |
21 const SkMatrix& viewMatrix, | 18 const SkMatrix& viewMatrix, |
22 const SkPath&, | 19 const SkPath&, |
23 const GrStrokeInfo&, | 20 const GrStrokeInfo&, |
24 bool antiAlias) const override; | 21 bool antiAlias) const override; |
25 | 22 |
26 protected: | 23 protected: |
27 StencilSupport onGetStencilSupport(const GrDrawTarget*, | 24 StencilSupport onGetStencilSupport(const GrDrawTarget*, |
28 const GrPipelineBuilder*, | 25 const GrPipelineBuilder*, |
29 const SkPath&, | 26 const SkPath&, |
30 const GrStrokeInfo&) const override { | 27 const GrStrokeInfo&) const override { |
31 return kNoSupport_StencilSupport; | 28 return kNoSupport_StencilSupport; |
32 } | 29 } |
33 | 30 |
34 bool onDrawPath(GrDrawTarget*, | 31 bool onDrawPath(GrDrawTarget*, |
35 GrPipelineBuilder*, | 32 GrPipelineBuilder*, |
36 GrColor, | 33 GrColor, |
37 const SkMatrix& viewMatrix, | 34 const SkMatrix& viewMatrix, |
38 const SkPath&, | 35 const SkPath&, |
39 const GrStrokeInfo&, | 36 const GrStrokeInfo&, |
40 bool antiAlias) override; | 37 bool antiAlias) override; |
41 SkAutoTUnref<GrGpu> fGpu; | 38 SkAutoTUnref<GrGpu> fGpu; |
42 typedef GrPathRenderer INHERITED; | 39 typedef GrPathRenderer INHERITED; |
43 }; | 40 }; |
44 | 41 |
45 | 42 |
46 #endif | 43 #endif |
OLD | NEW |