| 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 if (scissor.intersect(clipSpaceRTIBounds)) { | 350 if (scissor.intersect(clipSpaceRTIBounds)) { |
| 351 out->fScissorState.set(scissor); | 351 out->fScissorState.set(scissor); |
| 352 this->setPipelineBuilderStencil(pipelineBuilder, ars); | 352 this->setPipelineBuilderStencil(pipelineBuilder, ars); |
| 353 return true; | 353 return true; |
| 354 } | 354 } |
| 355 return false; | 355 return false; |
| 356 } | 356 } |
| 357 case GrClip::kClipStack_ClipType: { | 357 case GrClip::kClipStack_ClipType: { |
| 358 clipSpaceRTIBounds.offset(clip.origin()); | 358 clipSpaceRTIBounds.offset(clip.origin()); |
| 359 SkIRect clipSpaceReduceQueryBounds; | 359 SkIRect clipSpaceReduceQueryBounds; |
| 360 if (devBounds) { | 360 #define DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION 1 |
| 361 if (devBounds && !DISABLE_DEV_BOUNDS_FOR_CLIP_REDUCTION) { |
| 361 SkIRect devIBounds = devBounds->roundOut(); | 362 SkIRect devIBounds = devBounds->roundOut(); |
| 362 devIBounds.offset(clip.origin()); | 363 devIBounds.offset(clip.origin()); |
| 363 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de
vIBounds)) { | 364 if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, de
vIBounds)) { |
| 364 return false; | 365 return false; |
| 365 } | 366 } |
| 366 } else { | 367 } else { |
| 367 clipSpaceReduceQueryBounds = clipSpaceRTIBounds; | 368 clipSpaceReduceQueryBounds = clipSpaceRTIBounds; |
| 368 } | 369 } |
| 369 GrReducedClip::ReduceClipStack(*clip.clipStack(), | 370 GrReducedClip::ReduceClipStack(*clip.clipStack(), |
| 370 clipSpaceReduceQueryBounds, | 371 clipSpaceReduceQueryBounds, |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 | 1146 |
| 1146 //////////////////////////////////////////////////////////////////////////////// | 1147 //////////////////////////////////////////////////////////////////////////////// |
| 1147 | 1148 |
| 1148 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, | 1149 void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stenc
ilAttachment, |
| 1149 GrStencilSettings* settings) { | 1150 GrStencilSettings* settings) { |
| 1150 if (stencilAttachment) { | 1151 if (stencilAttachment) { |
| 1151 int stencilBits = stencilAttachment->bits(); | 1152 int stencilBits = stencilAttachment->bits(); |
| 1152 this->adjustStencilParams(settings, fClipMode, stencilBits); | 1153 this->adjustStencilParams(settings, fClipMode, stencilBits); |
| 1153 } | 1154 } |
| 1154 } | 1155 } |
| OLD | NEW |