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 #include "GrClipMaskManager.h" | 8 #include "GrClipMaskManager.h" |
9 #include "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
10 #include "GrAAHairLinePathRenderer.h" | 10 #include "GrAAHairLinePathRenderer.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 195 } |
196 return !failed; | 196 return !failed; |
197 } | 197 } |
198 | 198 |
199 //////////////////////////////////////////////////////////////////////////////// | 199 //////////////////////////////////////////////////////////////////////////////// |
200 // sort out what kind of clip mask needs to be created: alpha, stencil, | 200 // sort out what kind of clip mask needs to be created: alpha, stencil, |
201 // scissor, or entirely software | 201 // scissor, or entirely software |
202 bool GrClipMaskManager::setupClipping(GrDrawState* drawState, | 202 bool GrClipMaskManager::setupClipping(GrDrawState* drawState, |
203 GrDrawState::AutoRestoreEffects* are, | 203 GrDrawState::AutoRestoreEffects* are, |
204 GrDrawState::AutoRestoreStencil* ars, | 204 GrDrawState::AutoRestoreStencil* ars, |
205 ScissorState* scissorState, | 205 GrScissorState* scissorState, |
206 const GrClipData* clipDataIn, | 206 const GrClipData* clipDataIn, |
207 const SkRect* devBounds) { | 207 const SkRect* devBounds) { |
208 fCurrClipMaskType = kNone_ClipMaskType; | 208 fCurrClipMaskType = kNone_ClipMaskType; |
209 if (kRespectClip_StencilClipMode == fClipMode) { | 209 if (kRespectClip_StencilClipMode == fClipMode) { |
210 fClipMode = kIgnoreClip_StencilClipMode; | 210 fClipMode = kIgnoreClip_StencilClipMode; |
211 } | 211 } |
212 | 212 |
213 GrReducedClip::ElementList elements(16); | 213 GrReducedClip::ElementList elements(16); |
214 int32_t genID; | 214 int32_t genID; |
215 GrReducedClip::InitialState initialState; | 215 GrReducedClip::InitialState initialState; |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 } | 1081 } |
1082 | 1082 |
1083 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu
ffer, | 1083 void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBu
ffer, |
1084 GrStencilSettings* settings) { | 1084 GrStencilSettings* settings) { |
1085 // TODO: dynamically attach a stencil buffer | 1085 // TODO: dynamically attach a stencil buffer |
1086 if (stencilBuffer) { | 1086 if (stencilBuffer) { |
1087 int stencilBits = stencilBuffer->bits(); | 1087 int stencilBits = stencilBuffer->bits(); |
1088 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1088 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1089 } | 1089 } |
1090 } | 1090 } |
OLD | NEW |