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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 GrTexture* allocMaskTexture(int32_t elementsGenID, | 145 GrTexture* allocMaskTexture(int32_t elementsGenID, |
146 const SkIRect& clipSpaceIBounds, | 146 const SkIRect& clipSpaceIBounds, |
147 bool willUpload); | 147 bool willUpload); |
148 | 148 |
149 bool useSWOnlyPath(const GrDrawState*, const GrReducedClip::ElementList& ele
ments); | 149 bool useSWOnlyPath(const GrDrawState*, const GrReducedClip::ElementList& ele
ments); |
150 | 150 |
151 // Draws a clip element into the target alpha mask. The caller should have a
lready setup the | 151 // Draws a clip element into the target alpha mask. The caller should have a
lready setup the |
152 // desired blend operation. Optionally if the caller already selected a path
renderer it can | 152 // desired blend operation. Optionally if the caller already selected a path
renderer it can |
153 // be passed. Otherwise the function will select one if the element is a pat
h. | 153 // be passed. Otherwise the function will select one if the element is a pat
h. |
154 bool drawElement(GrDrawState*, | 154 bool drawElement(GrDrawState*, |
155 GrColor, | |
156 GrTexture* target, | 155 GrTexture* target, |
157 const SkClipStack::Element*, | 156 const SkClipStack::Element*, |
158 GrPathRenderer* pr = NULL); | 157 GrPathRenderer* pr = NULL); |
159 | 158 |
160 // Determines whether it is possible to draw the element to both the stencil
buffer and the | 159 // Determines whether it is possible to draw the element to both the stencil
buffer and the |
161 // alpha mask simultaneously. If so and the element is a path a compatible p
ath renderer is | 160 // alpha mask simultaneously. If so and the element is a path a compatible p
ath renderer is |
162 // also returned. | 161 // also returned. |
163 bool canStencilAndDrawElement(GrDrawState*, | 162 bool canStencilAndDrawElement(GrDrawState*, |
164 GrTexture* target, | 163 GrTexture* target, |
165 GrPathRenderer**, | 164 GrPathRenderer**, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 kAlpha_ClipMaskType, | 201 kAlpha_ClipMaskType, |
203 } fCurrClipMaskType; | 202 } fCurrClipMaskType; |
204 | 203 |
205 GrClipMaskCache fAACache; // cache for the AA path | 204 GrClipMaskCache fAACache; // cache for the AA path |
206 GrClipTarget* fClipTarget; | 205 GrClipTarget* fClipTarget; |
207 StencilClipMode fClipMode; | 206 StencilClipMode fClipMode; |
208 | 207 |
209 typedef SkNoncopyable INHERITED; | 208 typedef SkNoncopyable INHERITED; |
210 }; | 209 }; |
211 #endif // GrClipMaskManager_DEFINED | 210 #endif // GrClipMaskManager_DEFINED |
OLD | NEW |