OLD | NEW |
---|---|
1 | |
2 /* | 1 /* |
3 * Copyright 2012 Google Inc. | 2 * Copyright 2015 Google Inc. |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 #ifndef GrSoftwarePathRenderer_DEFINED | 8 #ifndef GrTessellatingPathRenderer_DEFINED |
10 #define GrSoftwarePathRenderer_DEFINED | 9 #define GrTessellatingPathRenderer_DEFINED |
11 | 10 |
12 #include "GrPathRenderer.h" | 11 #include "GrPathRenderer.h" |
13 | 12 #include "SkTemplates.h" |
reed1
2015/02/19 20:52:22
Why is this guy needed?
Stephen White
2015/02/20 21:58:41
Hysterical reasons. Removed.
| |
14 class GrContext; | |
15 | 13 |
16 /** | 14 /** |
17 * This class uses the software side to render a path to an SkBitmap and | 15 * Subclass that renders the path by converting to screen-space trapezoids plus |
18 * then uploads the result to the gpu | 16 * extra 1-pixel geometry for AA. |
19 */ | 17 */ |
20 class GrSoftwarePathRenderer : public GrPathRenderer { | 18 class SK_API GrTessellatingPathRenderer : public GrPathRenderer { |
21 public: | 19 public: |
22 GrSoftwarePathRenderer(GrContext* context) | 20 GrTessellatingPathRenderer(); |
23 : fContext(context) { | |
24 } | |
25 | 21 |
26 virtual bool canDrawPath(const GrDrawTarget*, | 22 virtual bool canDrawPath(const GrDrawTarget*, |
reed1
2015/02/19 20:52:22
nit: Skia removes "virtual" when there is also SK_
Stephen White
2015/02/20 21:58:41
Done.
| |
27 const GrPipelineBuilder*, | 23 const GrPipelineBuilder*, |
28 const SkMatrix& viewMatrix, | 24 const SkMatrix&, |
29 const SkPath&, | 25 const SkPath&, |
30 const SkStrokeRec&, | 26 const SkStrokeRec&, |
31 bool antiAlias) const SK_OVERRIDE; | 27 bool antiAlias) const SK_OVERRIDE; |
32 protected: | 28 protected: |
29 | |
33 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, | 30 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, |
34 const GrPipelineBuilder*, | 31 const GrPipelineBuilder*, |
35 const SkPath&, | 32 const SkPath&, |
36 const SkStrokeRec&) const SK_OVER RIDE; | 33 const SkStrokeRec&) const SK_OVER RIDE; |
37 | 34 |
38 virtual bool onDrawPath(GrDrawTarget*, | 35 virtual bool onDrawPath(GrDrawTarget*, |
39 GrPipelineBuilder*, | 36 GrPipelineBuilder*, |
40 GrColor, | 37 GrColor, |
41 const SkMatrix& viewMatrix, | 38 const SkMatrix& viewMatrix, |
42 const SkPath&, | 39 const SkPath&, |
43 const SkStrokeRec&, | 40 const SkStrokeRec&, |
44 bool antiAlias) SK_OVERRIDE; | 41 bool antiAlias) SK_OVERRIDE; |
45 | 42 |
46 private: | |
47 GrContext* fContext; | |
48 | |
49 typedef GrPathRenderer INHERITED; | 43 typedef GrPathRenderer INHERITED; |
50 }; | 44 }; |
51 | 45 |
52 #endif | 46 #endif |
OLD | NEW |