From d587ebe9ea6e06c45b69c71ee1fa32ef6b86296a Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Mon, 5 Feb 2018 09:15:20 -0500 Subject: Remove assert from SkStroke.cpp If we can't trust the contains tests on the bounding boxes we're already in a bad place. With this change we'll somewhat arbitrarily get one of the two contours but, hopefully, given the degeneracy of the geometry it won't matter which one dominates. BUG=skia:6491 Change-Id: Id6f92f9331dc04a2555267781b07e5218345ef1b Reviewed-on: https://skia-review.googlesource.com/103460 Reviewed-by: Cary Clark Commit-Queue: Robert Phillips --- src/core/SkStroke.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp index ab8df833c1..4568dc1610 100644 --- a/src/core/SkStroke.cpp +++ b/src/core/SkStroke.cpp @@ -299,8 +299,9 @@ void SkPathStroker::finishContour(bool close, bool currIsLine) { fOuter.close(); if (fCanIgnoreCenter) { - if (!fOuter.getBounds().contains(fInner.getBounds())) { - SkASSERT(fInner.getBounds().contains(fOuter.getBounds())); + // If we can ignore the center just make sure the larger of the two paths + // is preserved and don't add the smaller one. + if (fInner.getBounds().contains(fOuter.getBounds())) { fInner.swap(fOuter); } } else { -- cgit v1.2.3