OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | |
10 #ifndef GrPathRendererChain_DEFINED | 8 #ifndef GrPathRendererChain_DEFINED |
11 #define GrPathRendererChain_DEFINED | 9 #define GrPathRendererChain_DEFINED |
12 | 10 |
13 #include "GrRefCnt.h" | 11 #include "SkRefCnt.h" |
14 #include "SkTArray.h" | 12 #include "SkTArray.h" |
15 | 13 |
16 class GrContext; | 14 class GrContext; |
17 class GrDrawTarget; | 15 class GrDrawTarget; |
18 class GrPathRenderer; | 16 class GrPathRenderer; |
19 class SkPath; | 17 class SkPath; |
20 class SkStrokeRec; | 18 class SkStrokeRec; |
21 | 19 |
22 /** | 20 /** |
23 * Keeps track of an ordered list of path renderers. When a path needs to be | 21 * Keeps track of an ordered list of path renderers. When a path needs to be |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 is drawing the path to the stencil buffer then stencilSupport can be use
d to determine | 55 is drawing the path to the stencil buffer then stencilSupport can be use
d to determine |
58 whether the path can be rendered with arbitrary stencil rules or not. Se
e comments on | 56 whether the path can be rendered with arbitrary stencil rules or not. Se
e comments on |
59 StencilSupport in GrPathRenderer.h. */ | 57 StencilSupport in GrPathRenderer.h. */ |
60 GrPathRenderer* getPathRenderer(const SkPath& path, | 58 GrPathRenderer* getPathRenderer(const SkPath& path, |
61 const SkStrokeRec& rec, | 59 const SkStrokeRec& rec, |
62 const GrDrawTarget* target, | 60 const GrDrawTarget* target, |
63 DrawType drawType, | 61 DrawType drawType, |
64 StencilSupport* stencilSupport); | 62 StencilSupport* stencilSupport); |
65 | 63 |
66 private: | 64 private: |
67 | |
68 GrPathRendererChain(); | 65 GrPathRendererChain(); |
69 | 66 |
70 void init(); | 67 void init(); |
71 | 68 |
72 enum { | 69 enum { |
73 kPreAllocCount = 8, | 70 kPreAllocCount = 8, |
74 }; | 71 }; |
75 bool fInit; | 72 bool fInit; |
76 GrContext* fOwner; | 73 GrContext* fOwner; |
77 SkSTArray<kPreAllocCount, GrPathRenderer*, true> fChain; | 74 SkSTArray<kPreAllocCount, GrPathRenderer*, true> fChain; |
78 | 75 |
79 typedef SkRefCnt INHERITED; | 76 typedef SkRefCnt INHERITED; |
80 }; | 77 }; |
81 | 78 |
82 | |
83 #endif | 79 #endif |
OLD | NEW |