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 | 7 |
8 #ifndef GrClipMaskManager_DEFINED | 8 #ifndef GrClipMaskManager_DEFINED |
9 #define GrClipMaskManager_DEFINED | 9 #define GrClipMaskManager_DEFINED |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 */ | 99 */ |
100 enum ClipMaskType { | 100 enum ClipMaskType { |
101 kNone_ClipMaskType, | 101 kNone_ClipMaskType, |
102 kStencil_ClipMaskType, | 102 kStencil_ClipMaskType, |
103 kAlpha_ClipMaskType, | 103 kAlpha_ClipMaskType, |
104 } fCurrClipMaskType; | 104 } fCurrClipMaskType; |
105 | 105 |
106 GrClipMaskCache fAACache; // cache for the AA path | 106 GrClipMaskCache fAACache; // cache for the AA path |
107 | 107 |
108 // Attempts to install a series of coverage effects to implement the clip. R
eturn indicates | 108 // Attempts to install a series of coverage effects to implement the clip. R
eturn indicates |
109 // whether the element list was successfully converted to effects. One of th
e elements may | 109 // whether the element list was successfully converted to effects. |
110 // be selected to use the scissor. If so scissorRect will be updated to a va
lid rectangle | |
111 // that the caller should set as the scissor rect. If not, scissorRect won't
be modified. | |
112 bool installClipEffects(const GrReducedClip::ElementList&, | 110 bool installClipEffects(const GrReducedClip::ElementList&, |
113 GrDrawState::AutoRestoreEffects*, | 111 GrDrawState::AutoRestoreEffects*, |
114 const SkVector& clipOffset, | 112 const SkVector& clipOffset, |
115 const SkRect* devBounds, | 113 const SkRect* devBounds); |
116 SkIRect* scissorRect); | |
117 | 114 |
118 // Draws the clip into the stencil buffer | 115 // Draws the clip into the stencil buffer |
119 bool createStencilClipMask(int32_t elementsGenID, | 116 bool createStencilClipMask(int32_t elementsGenID, |
120 GrReducedClip::InitialState initialState, | 117 GrReducedClip::InitialState initialState, |
121 const GrReducedClip::ElementList& elements, | 118 const GrReducedClip::ElementList& elements, |
122 const SkIRect& clipSpaceIBounds, | 119 const SkIRect& clipSpaceIBounds, |
123 const SkIPoint& clipSpaceToStencilOffset); | 120 const SkIPoint& clipSpaceToStencilOffset); |
124 // Creates an alpha mask of the clip. The mask is a rasterization of element
s through the | 121 // Creates an alpha mask of the clip. The mask is a rasterization of element
s through the |
125 // rect specified by clipSpaceIBounds. | 122 // rect specified by clipSpaceIBounds. |
126 GrTexture* createAlphaClipMask(int32_t elementsGenID, | 123 GrTexture* createAlphaClipMask(int32_t elementsGenID, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 * clipping. | 176 * clipping. |
180 */ | 177 */ |
181 void adjustStencilParams(GrStencilSettings* settings, | 178 void adjustStencilParams(GrStencilSettings* settings, |
182 StencilClipMode mode, | 179 StencilClipMode mode, |
183 int stencilBitCnt); | 180 int stencilBitCnt); |
184 | 181 |
185 typedef SkNoncopyable INHERITED; | 182 typedef SkNoncopyable INHERITED; |
186 }; | 183 }; |
187 | 184 |
188 #endif // GrClipMaskManager_DEFINED | 185 #endif // GrClipMaskManager_DEFINED |
OLD | NEW |