summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp')
-rw-r--r--chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp b/chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp
index 1e74123abf6..622961911a4 100644
--- a/chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp
+++ b/chromium/third_party/skia/src/pathops/SkPathOpsLine.cpp
@@ -63,7 +63,7 @@ double SkDLine::exactPoint(const SkDPoint& xy) const {
return -1;
}
-double SkDLine::nearPoint(const SkDPoint& xy) const {
+double SkDLine::nearPoint(const SkDPoint& xy, bool* unequal) const {
if (!AlmostBetweenUlps(fPts[0].fX, xy.fX, fPts[1].fX)
|| !AlmostBetweenUlps(fPts[0].fY, xy.fY, fPts[1].fY)) {
return -1;
@@ -86,6 +86,9 @@ double SkDLine::nearPoint(const SkDPoint& xy) const {
if (!AlmostEqualUlps(largest, largest + dist)) { // is the dist within ULPS tolerance?
return -1;
}
+ if (unequal) {
+ *unequal = (float) largest != (float) (largest + dist);
+ }
t = SkPinT(t);
SkASSERT(between(0, t, 1));
return t;
@@ -189,13 +192,3 @@ double SkDLine::NearPointV(const SkDPoint& xy, double top, double bottom, double
}
return t;
}
-
-#ifdef SK_DEBUG
-void SkDLine::dump() {
- SkDebugf("{{");
- fPts[0].dump();
- SkDebugf(", ");
- fPts[1].dump();
- SkDebugf("}}\n");
-}
-#endif