Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: src/pathops/SkIntersectionHelper.h

Issue 23542056: path ops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: verbose + mutex around file number access Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkDQuadLineIntersection.cpp ('k') | src/pathops/SkIntersections.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkIntersectionHelper.h
diff --git a/src/pathops/SkIntersectionHelper.h b/src/pathops/SkIntersectionHelper.h
index af246b760ebfa2cd22b7462efd70cfe02bb3e902..1a4b1f044145e70054cc125033284b4c47dd56dd 100644
--- a/src/pathops/SkIntersectionHelper.h
+++ b/src/pathops/SkIntersectionHelper.h
@@ -17,8 +17,8 @@ public:
kCubic_Segment = SkPath::kCubic_Verb,
};
- void addCoincident(SkIntersectionHelper& other, const SkIntersections& ts, bool swap) {
- fContour->addCoincident(fIndex, other.fContour, other.fIndex, ts, swap);
+ bool addCoincident(SkIntersectionHelper& other, const SkIntersections& ts, bool swap) {
+ return fContour->addCoincident(fIndex, other.fContour, other.fIndex, ts, swap);
}
// FIXME: does it make sense to write otherIndex now if we're going to
@@ -27,9 +27,10 @@ public:
fContour->addOtherT(fIndex, index, otherT, otherIndex);
}
- void addPartialCoincident(SkIntersectionHelper& other, const SkIntersections& ts, int index,
+ bool addPartialCoincident(SkIntersectionHelper& other, const SkIntersections& ts, int index,
bool swap) {
- fContour->addPartialCoincident(fIndex, other.fContour, other.fIndex, ts, index, swap);
+ return fContour->addPartialCoincident(fIndex, other.fContour, other.fIndex, ts, index,
+ swap);
}
// Avoid collapsing t values that are close to the same since
@@ -77,7 +78,7 @@ public:
double mid = (t1 + t2) / 2;
SkDPoint midPtByT = segment.dPtAtT(mid);
SkDPoint midPtByAvg = SkDPoint::Mid(pt1, pt2);
- return midPtByT.approximatelyEqualHalf(midPtByAvg);
+ return midPtByT.approximatelyEqual(midPtByAvg);
}
SkScalar left() const {
« no previous file with comments | « src/pathops/SkDQuadLineIntersection.cpp ('k') | src/pathops/SkIntersections.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698