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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 if (scissor.intersect(clipSpaceRTIBounds)) { | 398 if (scissor.intersect(clipSpaceRTIBounds)) { |
399 out->fScissorState.set(scissor); | 399 out->fScissorState.set(scissor); |
400 this->setPipelineBuilderStencil(pipelineBuilder, ars); | 400 this->setPipelineBuilderStencil(pipelineBuilder, ars); |
401 return true; | 401 return true; |
402 } | 402 } |
403 return false; | 403 return false; |
404 } | 404 } |
405 case GrClip::kClipStack_ClipType: { | 405 case GrClip::kClipStack_ClipType: { |
406 clipSpaceRTIBounds.offset(clip.origin()); | 406 clipSpaceRTIBounds.offset(clip.origin()); |
407 SkIRect clipSpaceReduceQueryBounds; | 407 SkIRect clipSpaceReduceQueryBounds; |
408 #define DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION 1 | 408 #define DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION 0 |
409 if (devBounds && !DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION) { | 409 if (devBounds && !DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION) { |
410 SkIRect devIBounds = devBounds->roundOut(); | 410 SkIRect devIBounds = devBounds->roundOut(); |
411 devIBounds.offset(clip.origin()); | 411 devIBounds.offset(clip.origin()); |
412 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de
vIBounds)) { | 412 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de
vIBounds)) { |
413 return false; | 413 return false; |
414 } | 414 } |
415 } else { | 415 } else { |
416 clipSpaceReduceQueryBounds = clipSpaceRTIBounds; | 416 clipSpaceReduceQueryBounds = clipSpaceRTIBounds; |
417 } | 417 } |
418 GrReducedClip::ReduceClipStack(*clip.clipStack(), | 418 GrReducedClip::ReduceClipStack(*clip.clipStack(), |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1154 | 1154 |
1155 //////////////////////////////////////////////////////////////////////////////// | 1155 //////////////////////////////////////////////////////////////////////////////// |
1156 | 1156 |
1157 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, | 1157 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, |
1158 GrStencilSettings* settings) { | 1158 GrStencilSettings* settings) { |
1159 if (stencilAttachment) { | 1159 if (stencilAttachment) { |
1160 int stencilBits = stencilAttachment->bits(); | 1160 int stencilBits = stencilAttachment->bits(); |
1161 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1161 this->adjustStencilParams(settings, fClipMode, stencilBits); |
1162 } | 1162 } |
1163 } | 1163 } |
OLD | NEW |