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
diff --git a/src/pathops/SkOpContour.cpp b/src/pathops/SkOpContour.cpp
index 5feef79..874de38 100644
--- a/src/pathops/SkOpContour.cpp
+++ b/src/pathops/SkOpContour.cpp
@@ -212,20 +212,17 @@
if (partial ? startT != 0 || oMatchStart != 0 : (startT == 0) != (oMatchStart == 0)) {
bool added = false;
if (oMatchStart != 0) {
- added = thisOne.joinCoincidence(false, &other, oMatchStart, oStep, cancel);
+ added = thisOne.joinCoincidence(&other, oMatchStart, oStep, cancel);
}
- if (startT != 0 && !added) {
- (void) other.joinCoincidence(cancel, &thisOne, startT, step, cancel);
+ if (!cancel && startT != 0 && !added) {
+ (void) other.joinCoincidence(&thisOne, startT, step, cancel);
}
}
double oMatchEnd = cancel ? oStartT : oEndT;
if (partial ? endT != 1 || oMatchEnd != 1 : (endT == 1) != (oMatchEnd == 1)) {
bool added = false;
- if (oMatchEnd != 1) {
- added = thisOne.joinCoincidence(true, &other, oMatchEnd, -oStep, cancel);
- }
- if (endT != 1 && !added) {
- (void) other.joinCoincidence(!cancel, &thisOne, endT, -step, cancel);
+ if (cancel && endT != 1 && !added) {
+ (void) other.joinCoincidence(&thisOne, endT, -step, cancel);
}
}
}