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 #ifndef GrPathRenderer_DEFINED | 9 #ifndef GrPathRenderer_DEFINED |
10 #define GrPathRenderer_DEFINED | 10 #define GrPathRenderer_DEFINED |
11 | 11 |
12 #include "GrDrawTarget.h" | 12 #include "GrDrawTarget.h" |
13 #include "GrPathRendererChain.h" | 13 #include "GrPathRendererChain.h" |
14 #include "GrStencil.h" | 14 #include "GrStencil.h" |
15 | 15 |
16 #include "SkStrokeRec.h" | 16 #include "SkStrokeRec.h" |
17 #include "SkTArray.h" | 17 #include "SkTArray.h" |
18 | 18 |
19 class SkPath; | 19 class SkPath; |
20 | 20 |
21 struct GrPoint; | 21 struct GrPoint; |
22 | 22 |
23 /** | 23 /** |
24 * Base class for drawing paths into a GrDrawTarget. | 24 * Base class for drawing paths into a GrDrawTarget. |
25 * | 25 * |
26 * 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 |
27 * 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 |
28 * filter masks). | 28 * filter masks). |
29 */ | 29 */ |
30 class SK_API GrPathRenderer : public GrRefCnt { | 30 class SK_API GrPathRenderer : public SkRefCnt { |
31 public: | 31 public: |
32 SK_DECLARE_INST_COUNT(GrPathRenderer) | 32 SK_DECLARE_INST_COUNT(GrPathRenderer) |
33 | 33 |
34 /** | 34 /** |
35 * 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 |
36 * default implementation in GrCreatePathRenderer_none.cpp does not add any
additional | 36 * default implementation in GrCreatePathRenderer_none.cpp does not add any
additional |
37 * 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 |
38 * most preferred path renderer, second is second most preferred, etc. | 38 * most preferred path renderer, second is second most preferred, etc. |
39 * | 39 * |
40 * @param context the context that will use the path renderer | 40 * @param context the context that will use the path renderer |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // Helper version that gets the dev width and height from a GrSurface. | 185 // Helper version that gets the dev width and height from a GrSurface. |
186 static void GetPathDevBounds(const SkPath& path, | 186 static void GetPathDevBounds(const SkPath& path, |
187 const GrSurface* device, | 187 const GrSurface* device, |
188 const SkMatrix& matrix, | 188 const SkMatrix& matrix, |
189 SkRect* bounds) { | 189 SkRect* bounds) { |
190 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds
); | 190 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds
); |
191 } | 191 } |
192 | 192 |
193 private: | 193 private: |
194 | 194 |
195 typedef GrRefCnt INHERITED; | 195 typedef SkRefCnt INHERITED; |
196 }; | 196 }; |
197 | 197 |
198 #endif | 198 #endif |
OLD | NEW |