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 "GrCaps.h" | 9 #include "GrCaps.h" |
10 #include "GrDrawingManager.h" | 10 #include "GrDrawingManager.h" |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 SkIRect scissor = clip.irect(); | 310 SkIRect scissor = clip.irect(); |
311 if (scissor.intersect(clipSpaceRTIBounds)) { | 311 if (scissor.intersect(clipSpaceRTIBounds)) { |
312 out->fScissorState.set(scissor); | 312 out->fScissorState.set(scissor); |
313 this->setPipelineBuilderStencil(pipelineBuilder, ars); | 313 this->setPipelineBuilderStencil(pipelineBuilder, ars); |
314 return true; | 314 return true; |
315 } | 315 } |
316 return false; | 316 return false; |
317 } | 317 } |
318 case GrClip::kClipStack_ClipType: { | 318 case GrClip::kClipStack_ClipType: { |
319 clipSpaceRTIBounds.offset(clip.origin()); | 319 clipSpaceRTIBounds.offset(clip.origin()); |
320 SkIRect clipSpaceReduceQueryBounds; | |
321 if (devBounds) { | |
joshualitt
2015/11/23 17:26:07
When would we not have devbounds?
bsalomon
2015/11/23 17:59:34
Not sure... was planning to investigate that and p
joshualitt
2015/11/23 18:30:50
cool, other than possibly NVPR, everyone would, I
| |
322 SkIRect devIBounds = devBounds->roundOut(); | |
323 devIBounds.offset(clip.origin()); | |
324 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de vIBounds)) { | |
325 return false; | |
326 } | |
327 } else { | |
328 clipSpaceReduceQueryBounds = clipSpaceRTIBounds; | |
329 } | |
320 GrReducedClip::ReduceClipStack(*clip.clipStack(), | 330 GrReducedClip::ReduceClipStack(*clip.clipStack(), |
321 clipSpaceRTIBounds, | 331 clipSpaceReduceQueryBounds, |
322 &elements, | 332 &elements, |
323 &genID, | 333 &genID, |
324 &initialState, | 334 &initialState, |
325 &clipSpaceIBounds, | 335 &clipSpaceIBounds, |
326 &requiresAA); | 336 &requiresAA); |
327 if (elements.isEmpty()) { | 337 if (elements.isEmpty()) { |
328 if (GrReducedClip::kAllIn_InitialState == initialState) { | 338 if (GrReducedClip::kAllIn_InitialState == initialState) { |
329 if (clipSpaceIBounds == clipSpaceRTIBounds) { | 339 if (clipSpaceIBounds == clipSpaceRTIBounds) { |
330 this->setPipelineBuilderStencil(pipelineBuilder, ars); | 340 this->setPipelineBuilderStencil(pipelineBuilder, ars); |
331 return true; | 341 return true; |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1096 | 1106 |
1097 //////////////////////////////////////////////////////////////////////////////// | 1107 //////////////////////////////////////////////////////////////////////////////// |
1098 | 1108 |
1099 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, | 1109 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc ilAttachment, |
1100 GrStencilSettings* settings) { | 1110 GrStencilSettings* settings) { |
1101 if (stencilAttachment) { | 1111 if (stencilAttachment) { |
1102 int stencilBits = stencilAttachment->bits(); | 1112 int stencilBits = stencilAttachment->bits(); |
1103 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1113 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1104 } | 1114 } |
1105 } | 1115 } |
OLD | NEW |