aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkClipStack.cpp
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-07-22 08:39:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-22 08:39:06 -0700
commitd50e2401787dc5632453293b65f8255b12450b9b (patch)
treec3ed5f0ea2ea09e325e823af2f16f1f7fc4992cf /src/core/SkClipStack.cpp
parentaec570e2d72cbb861be18dddd1a472b93f3b87d0 (diff)
Fix SkClipStack bug with inverse-filled difference elements
Previously, SkClipStack would call "setEmpty" on itself when an inverse-filled difference element made the stack empty. This was a problem because setEmpty would forget the element had an inverse fill, yet leave the op as "difference". This change modifies it to manually update the clip bounds and set the gen-ID to kEmptyGenID, rather than calling setEmpty. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175493002 Review-Url: https://codereview.chromium.org/2175493002
Diffstat (limited to 'src/core/SkClipStack.cpp')
-rw-r--r--src/core/SkClipStack.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp
index e39aeeea80..06418b46ba 100644
--- a/src/core/SkClipStack.cpp
+++ b/src/core/SkClipStack.cpp
@@ -237,10 +237,10 @@ void SkClipStack::Element::combineBoundsDiff(FillCombo combination, const SkRect
// is erased, so the only pixels that can remain set
// occur w/in the intersection of the two finite bounds
if (!fFiniteBound.intersect(prevFinite)) {
- this->setEmpty();
- } else {
- fFiniteBoundType = kNormal_BoundsType;
+ fFiniteBound.setEmpty();
+ fGenID = kEmptyGenID;
}
+ fFiniteBoundType = kNormal_BoundsType;
break;
case kPrev_Cur_FillCombo:
// The most conservative result bound is that of the