OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 | |
10 #ifndef GrPathRenderer_DEFINED | 9 #ifndef GrPathRenderer_DEFINED |
11 #define GrPathRenderer_DEFINED | 10 #define GrPathRenderer_DEFINED |
12 | 11 |
13 #include "GrDrawTarget.h" | 12 #include "GrDrawTarget.h" |
14 #include "GrPathRendererChain.h" | 13 #include "GrPathRendererChain.h" |
15 #include "GrStencil.h" | 14 #include "GrStencil.h" |
16 | 15 |
17 #include "SkStrokeRec.h" | 16 #include "SkStrokeRec.h" |
18 #include "SkTArray.h" | 17 #include "SkTArray.h" |
19 | 18 |
20 class SkPath; | 19 class SkPath; |
21 | 20 |
22 struct GrPoint; | 21 struct GrPoint; |
23 | 22 |
24 /** | 23 /** |
25 * Base class for drawing paths into a GrDrawTarget. | 24 * Base class for drawing paths into a GrDrawTarget. |
26 * | 25 * |
27 * Derived classes can use stages GrPaint::kTotalStages through GrDrawState::kN
umStages-1. The | 26 * Derived classes can use stages GrPaint::kTotalStages through GrDrawState::kN
umStages-1. The |
28 * stages before GrPaint::kTotalStages are reserved for setting up the draw (i.
e., textures and | 27 * stages before GrPaint::kTotalStages are reserved for setting up the draw (i.
e., textures and |
29 * filter masks). | 28 * filter masks). |
30 */ | 29 */ |
31 class GR_API GrPathRenderer : public GrRefCnt { | 30 class SK_API GrPathRenderer : public GrRefCnt { |
32 public: | 31 public: |
33 SK_DECLARE_INST_COUNT(GrPathRenderer) | 32 SK_DECLARE_INST_COUNT(GrPathRenderer) |
34 | 33 |
35 /** | 34 /** |
36 * This is called to install custom path renderers in every GrContext at cre
ate time. The | 35 * This is called to install custom path renderers in every GrContext at cre
ate time. The |
37 * default implementation in GrCreatePathRenderer_none.cpp does not add any
additional | 36 * default implementation in GrCreatePathRenderer_none.cpp does not add any
additional |
38 * renderers. Link against another implementation to install your own. The f
irst added is the | 37 * renderers. Link against another implementation to install your own. The f
irst added is the |
39 * most preferred path renderer, second is second most preferred, etc. | 38 * most preferred path renderer, second is second most preferred, etc. |
40 * | 39 * |
41 * @param context the context that will use the path renderer | 40 * @param context the context that will use the path renderer |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 SkRect* bounds) { | 189 SkRect* bounds) { |
191 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds
); | 190 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds
); |
192 } | 191 } |
193 | 192 |
194 private: | 193 private: |
195 | 194 |
196 typedef GrRefCnt INHERITED; | 195 typedef GrRefCnt INHERITED; |
197 }; | 196 }; |
198 | 197 |
199 #endif | 198 #endif |
OLD | NEW |