OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef GrClipMaskManager_DEFINED | 7 #ifndef GrClipMaskManager_DEFINED |
8 #define GrClipMaskManager_DEFINED | 8 #define GrClipMaskManager_DEFINED |
9 | 9 |
10 #include "GrClipMaskCache.h" | 10 #include "GrClipMaskCache.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 bool isClipInAlpha() const { | 67 bool isClipInAlpha() const { |
68 return kAlpha_ClipMaskType == fCurrClipMaskType; | 68 return kAlpha_ClipMaskType == fCurrClipMaskType; |
69 } | 69 } |
70 | 70 |
71 GrContext* getContext() { | 71 GrContext* getContext() { |
72 return fAACache.getContext(); | 72 return fAACache.getContext(); |
73 } | 73 } |
74 | 74 |
75 void setClipTarget(GrClipTarget*); | 75 void setClipTarget(GrClipTarget*); |
76 | 76 |
77 void adjustPathStencilParams(const GrStencilBuffer*, GrStencilSettings*); | 77 void adjustPathStencilParams(const GrStencilAttachment*, GrStencilSettings*)
; |
78 | 78 |
79 private: | 79 private: |
80 /** | 80 /** |
81 * Informs the helper function adjustStencilParams() about how the stencil | 81 * Informs the helper function adjustStencilParams() about how the stencil |
82 * buffer clip is being used. | 82 * buffer clip is being used. |
83 */ | 83 */ |
84 enum StencilClipMode { | 84 enum StencilClipMode { |
85 // Draw to the clip bit of the stencil buffer | 85 // Draw to the clip bit of the stencil buffer |
86 kModifyClip_StencilClipMode, | 86 kModifyClip_StencilClipMode, |
87 // Clip against the existing representation of the clip in the high bit | 87 // Clip against the existing representation of the clip in the high bit |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 kAlpha_ClipMaskType, | 189 kAlpha_ClipMaskType, |
190 } fCurrClipMaskType; | 190 } fCurrClipMaskType; |
191 | 191 |
192 GrClipMaskCache fAACache; // cache for the AA path | 192 GrClipMaskCache fAACache; // cache for the AA path |
193 GrClipTarget* fClipTarget; | 193 GrClipTarget* fClipTarget; |
194 StencilClipMode fClipMode; | 194 StencilClipMode fClipMode; |
195 | 195 |
196 typedef SkNoncopyable INHERITED; | 196 typedef SkNoncopyable INHERITED; |
197 }; | 197 }; |
198 #endif // GrClipMaskManager_DEFINED | 198 #endif // GrClipMaskManager_DEFINED |
OLD | NEW |