| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 GrTexture* srcMask, | 159 GrTexture* srcMask, |
| 160 SkRegion::Op op, | 160 SkRegion::Op op, |
| 161 const SkIRect& dstBound, | 161 const SkIRect& dstBound, |
| 162 const SkIRect& srcBound); | 162 const SkIRect& srcBound); |
| 163 | 163 |
| 164 GrTexture* createTempMask(int width, int height); | 164 GrTexture* createTempMask(int width, int height); |
| 165 | 165 |
| 166 void setupCache(const SkClipStack& clip, | 166 void setupCache(const SkClipStack& clip, |
| 167 const SkIRect& bounds); | 167 const SkIRect& bounds); |
| 168 /** | 168 /** |
| 169 * Called prior to return control back the GrGpu in setupClipping. It | 169 * Called prior to return control back the GrGpu in setupClipping. It update
s the |
| 170 * updates the GrGpu with stencil settings that account stencil-based | 170 * GrPipelineBuilder with stencil settings that account for stencil-based cl
ipping. |
| 171 * clipping. | |
| 172 */ | 171 */ |
| 173 void setPipelineBuilderStencil(GrPipelineBuilder*, GrPipelineBuilder::AutoRe
storeStencil*); | 172 void setPipelineBuilderStencil(GrPipelineBuilder*, GrPipelineBuilder::AutoRe
storeStencil*); |
| 174 | 173 |
| 175 /** | 174 /** |
| 176 * Adjusts the stencil settings to account for interaction with stencil | 175 * Adjusts the stencil settings to account for interaction with stencil |
| 177 * clipping. | 176 * clipping. |
| 178 */ | 177 */ |
| 179 void adjustStencilParams(GrStencilSettings* settings, | 178 void adjustStencilParams(GrStencilSettings* settings, |
| 180 StencilClipMode mode, | 179 StencilClipMode mode, |
| 181 int stencilBitCnt); | 180 int stencilBitCnt); |
| 182 | 181 |
| 183 /** | 182 /** |
| 184 * We may represent the clip as a mask in the stencil buffer or as an alpha | 183 * We may represent the clip as a mask in the stencil buffer or as an alpha |
| 185 * texture. It may be neither because the scissor rect suffices or we | 184 * texture. It may be neither because the scissor rect suffices or we |
| 186 * haven't yet examined the clip. | 185 * haven't yet examined the clip. |
| 187 */ | 186 */ |
| 188 enum ClipMaskType { | 187 enum ClipMaskType { |
| 189 kNone_ClipMaskType, | 188 kNone_ClipMaskType, |
| 190 kStencil_ClipMaskType, | 189 kStencil_ClipMaskType, |
| 191 kAlpha_ClipMaskType, | 190 kAlpha_ClipMaskType, |
| 192 } fCurrClipMaskType; | 191 } fCurrClipMaskType; |
| 193 | 192 |
| 194 GrClipMaskCache fAACache; // cache for the AA path | 193 GrClipMaskCache fAACache; // cache for the AA path |
| 195 GrClipTarget* fClipTarget; | 194 GrClipTarget* fClipTarget; |
| 196 StencilClipMode fClipMode; | 195 StencilClipMode fClipMode; |
| 197 | 196 |
| 198 typedef SkNoncopyable INHERITED; | 197 typedef SkNoncopyable INHERITED; |
| 199 }; | 198 }; |
| 200 #endif // GrClipMaskManager_DEFINED | 199 #endif // GrClipMaskManager_DEFINED |
| OLD | NEW |