| 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, |
| 155 GrTexture* target, | 156 GrTexture* target, |
| 156 const SkClipStack::Element*, | 157 const SkClipStack::Element*, |
| 157 GrPathRenderer* pr = NULL); | 158 GrPathRenderer* pr = NULL); |
| 158 | 159 |
| 159 // Determines whether it is possible to draw the element to both the stencil
buffer and the | 160 // Determines whether it is possible to draw the element to both the stencil
buffer and the |
| 160 // alpha mask simultaneously. If so and the element is a path a compatible p
ath renderer is | 161 // alpha mask simultaneously. If so and the element is a path a compatible p
ath renderer is |
| 161 // also returned. | 162 // also returned. |
| 162 bool canStencilAndDrawElement(GrDrawState*, | 163 bool canStencilAndDrawElement(GrDrawState*, |
| 163 GrTexture* target, | 164 GrTexture* target, |
| 164 GrPathRenderer**, | 165 GrPathRenderer**, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 kAlpha_ClipMaskType, | 202 kAlpha_ClipMaskType, |
| 202 } fCurrClipMaskType; | 203 } fCurrClipMaskType; |
| 203 | 204 |
| 204 GrClipMaskCache fAACache; // cache for the AA path | 205 GrClipMaskCache fAACache; // cache for the AA path |
| 205 GrClipTarget* fClipTarget; | 206 GrClipTarget* fClipTarget; |
| 206 StencilClipMode fClipMode; | 207 StencilClipMode fClipMode; |
| 207 | 208 |
| 208 typedef SkNoncopyable INHERITED; | 209 typedef SkNoncopyable INHERITED; |
| 209 }; | 210 }; |
| 210 #endif // GrClipMaskManager_DEFINED | 211 #endif // GrClipMaskManager_DEFINED |
| OLD | NEW |