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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 * haven't yet examined the clip. | 98 * haven't yet examined the clip. |
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 |
| 109 // whether the element list was successfully converted to effects. |
| 110 bool installClipEffects(const GrReducedClip::ElementList&, |
| 111 GrDrawState::AutoRestoreEffects*, |
| 112 const SkVector& clipOffset, |
| 113 const SkRect* devBounds); |
| 114 |
108 // Draws the clip into the stencil buffer | 115 // Draws the clip into the stencil buffer |
109 bool createStencilClipMask(int32_t elementsGenID, | 116 bool createStencilClipMask(int32_t elementsGenID, |
110 GrReducedClip::InitialState initialState, | 117 GrReducedClip::InitialState initialState, |
111 const GrReducedClip::ElementList& elements, | 118 const GrReducedClip::ElementList& elements, |
112 const SkIRect& clipSpaceIBounds, | 119 const SkIRect& clipSpaceIBounds, |
113 const SkIPoint& clipSpaceToStencilOffset); | 120 const SkIPoint& clipSpaceToStencilOffset); |
114 // 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 |
115 // rect specified by clipSpaceIBounds. | 122 // rect specified by clipSpaceIBounds. |
116 GrTexture* createAlphaClipMask(int32_t elementsGenID, | 123 GrTexture* createAlphaClipMask(int32_t elementsGenID, |
117 GrReducedClip::InitialState initialState, | 124 GrReducedClip::InitialState initialState, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 * clipping. | 173 * clipping. |
167 */ | 174 */ |
168 void adjustStencilParams(GrStencilSettings* settings, | 175 void adjustStencilParams(GrStencilSettings* settings, |
169 StencilClipMode mode, | 176 StencilClipMode mode, |
170 int stencilBitCnt); | 177 int stencilBitCnt); |
171 | 178 |
172 typedef SkNoncopyable INHERITED; | 179 typedef SkNoncopyable INHERITED; |
173 }; | 180 }; |
174 | 181 |
175 #endif // GrClipMaskManager_DEFINED | 182 #endif // GrClipMaskManager_DEFINED |
OLD | NEW |