| Index: src/gpu/GrClipMaskManager.cpp
|
| diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
|
| index 9b78cdfddaa0a5454fda6f24e5f63ffe7d9ec04b..fa9d189e8c384ac9d6207b68f8f53470e10b151d 100644
|
| --- a/src/gpu/GrClipMaskManager.cpp
|
| +++ b/src/gpu/GrClipMaskManager.cpp
|
| @@ -317,8 +317,18 @@ bool GrClipMaskManager::setupClipping(const GrPipelineBuilder& pipelineBuilder,
|
| }
|
| case GrClip::kClipStack_ClipType: {
|
| clipSpaceRTIBounds.offset(clip.origin());
|
| + SkIRect clipSpaceReduceQueryBounds;
|
| + if (devBounds) {
|
| + SkIRect devIBounds = devBounds->roundOut();
|
| + devIBounds.offset(clip.origin());
|
| + if (!clipSpaceReduceQueryBounds.intersect(clipSpaceRTIBounds, devIBounds)) {
|
| + return false;
|
| + }
|
| + } else {
|
| + clipSpaceReduceQueryBounds = clipSpaceRTIBounds;
|
| + }
|
| GrReducedClip::ReduceClipStack(*clip.clipStack(),
|
| - clipSpaceRTIBounds,
|
| + clipSpaceReduceQueryBounds,
|
| &elements,
|
| &genID,
|
| &initialState,
|
|
|