diff options
Diffstat (limited to 'chromium/third_party/skia/src/gpu/GrReducedClip.cpp')
-rw-r--r-- | chromium/third_party/skia/src/gpu/GrReducedClip.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/chromium/third_party/skia/src/gpu/GrReducedClip.cpp b/chromium/third_party/skia/src/gpu/GrReducedClip.cpp index 8480e041b8d..6ad9cc6d8b8 100644 --- a/chromium/third_party/skia/src/gpu/GrReducedClip.cpp +++ b/chromium/third_party/skia/src/gpu/GrReducedClip.cpp @@ -72,6 +72,8 @@ void ReduceClipStack(const SkClipStack& stack, *requiresAA = false; } } else if (isectRect.intersect(stackBounds, scalarQueryBounds)) { + // If the caller asked for tighter integer bounds we may be able to + // return kAllIn and give the bounds with no elements if (NULL != tighterBounds) { isectRect.roundOut(tighterBounds); SkRect scalarTighterBounds = SkRect::Make(*tighterBounds); @@ -83,14 +85,14 @@ void ReduceClipStack(const SkClipStack& stack, *initialState = kAllIn_InitialState; return; } - *initialState = kAllOut_InitialState; - // iior should only be true if aa/non-aa status matches among all elements. - SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); - bool doAA = iter.prev()->isAA(); - SkNEW_INSERT_AT_LLIST_HEAD(result, Element, (isectRect, SkRegion::kReplace_Op, doAA)); - if (NULL != requiresAA) { - *requiresAA = doAA; - } + } + *initialState = kAllOut_InitialState; + // iior should only be true if aa/non-aa status matches among all elements. + SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); + bool doAA = iter.prev()->isAA(); + SkNEW_INSERT_AT_LLIST_HEAD(result, Element, (isectRect, SkRegion::kReplace_Op, doAA)); + if (NULL != requiresAA) { + *requiresAA = doAA; } } else { *initialState = kAllOut_InitialState; |