| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * 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 |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrPathRendererChain_DEFINED | 8 #ifndef GrPathRendererChain_DEFINED |
| 9 #define GrPathRendererChain_DEFINED | 9 #define GrPathRendererChain_DEFINED |
| 10 | 10 |
| 11 #include "SkPath.h" |
| 11 #include "SkRefCnt.h" | 12 #include "SkRefCnt.h" |
| 12 #include "SkTArray.h" | 13 #include "SkTArray.h" |
| 13 | 14 |
| 14 class GrContext; | 15 class GrContext; |
| 15 class GrDrawTarget; | 16 class GrDrawTarget; |
| 16 class GrPathRenderer; | 17 class GrPathRenderer; |
| 17 class SkPath; | 18 class SkPath; |
| 18 class SkStrokeRec; | 19 class SkStrokeRec; |
| 19 | 20 |
| 20 /** | 21 /** |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // coverage AA. | 53 // coverage AA. |
| 53 }; | 54 }; |
| 54 /** Returns a GrPathRenderer compatible with the request if one is available
. If the caller | 55 /** Returns a GrPathRenderer compatible with the request if one is available
. If the caller |
| 55 is drawing the path to the stencil buffer then stencilSupport can be use
d to determine | 56 is drawing the path to the stencil buffer then stencilSupport can be use
d to determine |
| 56 whether the path can be rendered with arbitrary stencil rules or not. Se
e comments on | 57 whether the path can be rendered with arbitrary stencil rules or not. Se
e comments on |
| 57 StencilSupport in GrPathRenderer.h. */ | 58 StencilSupport in GrPathRenderer.h. */ |
| 58 GrPathRenderer* getPathRenderer(const SkPath& path, | 59 GrPathRenderer* getPathRenderer(const SkPath& path, |
| 59 const SkStrokeRec& rec, | 60 const SkStrokeRec& rec, |
| 60 const GrDrawTarget* target, | 61 const GrDrawTarget* target, |
| 61 DrawType drawType, | 62 DrawType drawType, |
| 63 SkPath::FillType fillType, |
| 62 StencilSupport* stencilSupport); | 64 StencilSupport* stencilSupport); |
| 63 | 65 |
| 64 private: | 66 private: |
| 65 GrPathRendererChain(); | 67 GrPathRendererChain(); |
| 66 | 68 |
| 67 void init(); | 69 void init(); |
| 68 | 70 |
| 69 enum { | 71 enum { |
| 70 kPreAllocCount = 8, | 72 kPreAllocCount = 8, |
| 71 }; | 73 }; |
| 72 bool fInit; | 74 bool fInit; |
| 73 GrContext* fOwner; | 75 GrContext* fOwner; |
| 74 SkSTArray<kPreAllocCount, GrPathRenderer*, true> fChain; | 76 SkSTArray<kPreAllocCount, GrPathRenderer*, true> fChain; |
| 75 | 77 |
| 76 typedef SkRefCnt INHERITED; | 78 typedef SkRefCnt INHERITED; |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 #endif | 81 #endif |
| OLD | NEW |