Index: src/pathops/SkPathWriter.cpp |
diff --git a/src/pathops/SkPathWriter.cpp b/src/pathops/SkPathWriter.cpp |
index 1f6dddd137f03a1cfc289880b7a074b88bf41be4..c94809e8ecc183784f8cd0337953df7c76b74b17 100644 |
--- a/src/pathops/SkPathWriter.cpp |
+++ b/src/pathops/SkPathWriter.cpp |
@@ -48,23 +48,26 @@ void SkPathWriter::cubicTo(const SkPoint& pt1, const SkPoint& pt2, const SkOpPtT |
fCurrent.cubicTo(pt1, pt2, pt3->fPt); |
} |
-void SkPathWriter::deferredLine(const SkOpPtT* pt) { |
+bool SkPathWriter::deferredLine(const SkOpPtT* pt) { |
SkASSERT(fFirstPtT); |
SkASSERT(fDefer[0]); |
if (fDefer[0] == pt) { |
// FIXME: why we're adding a degenerate line? Caller should have preflighted this. |
- return; |
+ return true; |
} |
if (pt->contains(fDefer[0])) { |
// FIXME: why we're adding a degenerate line? |
- return; |
+ return true; |
+ } |
+ if (this->matchedLast(pt)) { |
+ return false; |
} |
- SkASSERT(!this->matchedLast(pt)); |
if (fDefer[1] && this->changedSlopes(pt)) { |
this->lineTo(); |
fDefer[0] = fDefer[1]; |
} |
fDefer[1] = pt; |
+ return true; |
} |
void SkPathWriter::deferredMove(const SkOpPtT* pt) { |