commit | b893a4c569d0719a395abffb266d1d61af847e2f | [log] [tgz] |
---|---|---|
author | cdalton <cdalton@nvidia.com> | Thu Mar 17 12:56:11 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Thu Mar 17 12:56:11 2016 -0700 |
tree | c314e002fea32b026dee2da28c2e546a01648021 | |
parent | a483da395a4f3b82073057420ac1318d2c7f3f95 [diff] [blame] |
Add asRRect method to SkClipStack::Element Adds an asRRect method alongside asPath, for clip implementations that can be generalized to round rects. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1793373002 Review URL: https://codereview.chromium.org/1793373002
diff --git a/src/core/SkClipStack.cpp b/src/core/SkClipStack.cpp index 4227eea..4e53d8b 100644 --- a/src/core/SkClipStack.cpp +++ b/src/core/SkClipStack.cpp
@@ -21,6 +21,7 @@ SkClipStack::Element::Element(const Element& that) { switch (that.getType()) { case kEmpty_Type: + fRRect.setEmpty(); fPath.reset(); break; case kRect_Type: // Rect uses rrect @@ -171,6 +172,7 @@ SkASSERT(kNormal_BoundsType == fFiniteBoundType); SkASSERT(!fIsIntersectionOfRects); SkASSERT(kEmptyGenID == fGenID); + SkASSERT(fRRect.isEmpty()); SkASSERT(!fPath.isValid()); }