aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpContour.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathops/SkOpContour.cpp')
-rw-r--r--src/pathops/SkOpContour.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/pathops/SkOpContour.cpp b/src/pathops/SkOpContour.cpp
index 98467c558c..62380ab4fa 100644
--- a/src/pathops/SkOpContour.cpp
+++ b/src/pathops/SkOpContour.cpp
@@ -31,15 +31,19 @@ void SkOpContour::toReversePath(SkPathWriter* path) const {
path->assemble();
}
-SkOpSegment* SkOpContour::undoneSegment(SkOpSpanBase** startPtr, SkOpSpanBase** endPtr) {
- SkOpSegment* segment = &fHead;
+SkOpSpan* SkOpContour::undoneSpan() {
+ SkOpSegment* testSegment = &fHead;
+ bool allDone = true;
do {
- if (segment->done()) {
+ if (testSegment->done()) {
continue;
}
- segment->undoneSpan(startPtr, endPtr);
- return segment;
- } while ((segment = segment->next()));
+ allDone = false;
+ return testSegment->undoneSpan();
+ } while ((testSegment = testSegment->next()));
+ if (allDone) {
+ fDone = true;
+ }
return nullptr;
}