diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-21 17:04:29 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-21 17:04:29 +0000 |
commit | 866f4e34a943c115ac372c22123a1520aa5f9b06 (patch) | |
tree | d2b7e2b36ae069cc1a6936d797d94cf1d3e86d27 /src/pathops/SkOpAngle.cpp | |
parent | 8660783e196dc3cb4ead492253a493844fa43f7a (diff) |
optimize pathops coverage
Remove unused code from SkOpSegment.cpp and friends.
Add new tests exposed by coverage.
Fix a bug exposed by coverage -- removing the need to detect points that are nearby when intersecting.
Add gyp rule for building coverage flavor on Mac.
R=mtklein@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/75453003
git-svn-id: http://skia.googlecode.com/svn/trunk@12344 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pathops/SkOpAngle.cpp')
-rw-r--r-- | src/pathops/SkOpAngle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp index 4144add6fb..83ca55c4fe 100644 --- a/src/pathops/SkOpAngle.cpp +++ b/src/pathops/SkOpAngle.cpp @@ -108,7 +108,9 @@ bool SkOpAngle::operator<(const SkOpAngle& rh) const { // this/lh: left-hand; r } // see if either curve can be lengthened before trying the tangent if (fSegment->other(fEnd) != rh.fSegment // tangents not absolutely identical - && rh.fSegment->other(rh.fEnd) != fSegment) { // and not intersecting + && rh.fSegment->other(rh.fEnd) != fSegment + && y != -DBL_EPSILON + && ry != -DBL_EPSILON) { // and not intersecting SkOpAngle longer = *this; SkOpAngle rhLonger = rh; if ((longer.lengthen(rh) | rhLonger.lengthen(*this)) // lengthen both |