OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 GrSoftwarePathRenderer_DEFINED | 9 #ifndef GrSoftwarePathRenderer_DEFINED |
10 #define GrSoftwarePathRenderer_DEFINED | 10 #define GrSoftwarePathRenderer_DEFINED |
11 | 11 |
12 #include "GrPathRenderer.h" | 12 #include "GrPathRenderer.h" |
13 | 13 |
14 class GrContext; | 14 class GrContext; |
15 | 15 |
16 /** | 16 /** |
17 * This class uses the software side to render a path to an SkBitmap and | 17 * This class uses the software side to render a path to an SkBitmap and |
18 * then uploads the result to the gpu | 18 * then uploads the result to the gpu |
19 */ | 19 */ |
20 class GrSoftwarePathRenderer : public GrPathRenderer { | 20 class GrSoftwarePathRenderer : public GrPathRenderer { |
21 public: | 21 public: |
22 GrSoftwarePathRenderer(GrContext* context) | 22 GrSoftwarePathRenderer(GrContext* context) |
23 : fContext(context) { | 23 : fContext(context) { |
24 } | 24 } |
25 | 25 |
26 virtual bool canDrawPath(const SkPath&, | 26 virtual bool canDrawPath(const GrDrawTarget*, |
| 27 const GrDrawState*, |
| 28 const SkPath&, |
27 const SkStrokeRec&, | 29 const SkStrokeRec&, |
28 const GrDrawTarget*, | |
29 bool antiAlias) const SK_OVERRIDE; | 30 bool antiAlias) const SK_OVERRIDE; |
30 protected: | 31 protected: |
31 virtual StencilSupport onGetStencilSupport(const SkPath&, | 32 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, |
32 const SkStrokeRec&, | 33 const GrDrawState*, |
33 const GrDrawTarget*) const SK_OVE
RRIDE; | 34 const SkPath&, |
| 35 const SkStrokeRec&) const SK_OVER
RIDE; |
34 | 36 |
35 virtual bool onDrawPath(const SkPath&, | 37 virtual bool onDrawPath(GrDrawTarget*, |
| 38 GrDrawState*, |
| 39 const SkPath&, |
36 const SkStrokeRec&, | 40 const SkStrokeRec&, |
37 GrDrawTarget*, | |
38 bool antiAlias) SK_OVERRIDE; | 41 bool antiAlias) SK_OVERRIDE; |
39 | 42 |
40 private: | 43 private: |
41 GrContext* fContext; | 44 GrContext* fContext; |
42 | 45 |
43 typedef GrPathRenderer INHERITED; | 46 typedef GrPathRenderer INHERITED; |
44 }; | 47 }; |
45 | 48 |
46 #endif | 49 #endif |
OLD | NEW |