| Index: src/pathops/SkPathOpsSimplify.cpp
|
| diff --git a/src/pathops/SkPathOpsSimplify.cpp b/src/pathops/SkPathOpsSimplify.cpp
|
| index 66a6c40268eb71779389303a20d261dbd314c769..0917b69e475ab19069e3736f6a60e2da5d9441df 100644
|
| --- a/src/pathops/SkPathOpsSimplify.cpp
|
| +++ b/src/pathops/SkPathOpsSimplify.cpp
|
| @@ -13,21 +13,24 @@ static bool bridgeWinding(SkTArray<SkOpContour*, true>& contourList, SkPathWrite
|
| bool firstContour = true;
|
| bool unsortable = false;
|
| bool topUnsortable = false;
|
| + bool firstPass = true;
|
| + SkPoint lastTopLeft;
|
| SkPoint topLeft = {SK_ScalarMin, SK_ScalarMin};
|
| do {
|
| int index, endIndex;
|
| bool topDone;
|
| + lastTopLeft = topLeft;
|
| SkOpSegment* current = FindSortableTop(contourList, SkOpAngle::kUnaryWinding, &firstContour,
|
| - &index, &endIndex, &topLeft, &topUnsortable, &topDone);
|
| + &index, &endIndex, &topLeft, &topUnsortable, &topDone, firstPass);
|
| if (!current) {
|
| - if (topUnsortable || !topDone) {
|
| - topUnsortable = false;
|
| + if ((!topUnsortable || firstPass) && !topDone) {
|
| SkASSERT(topLeft.fX != SK_ScalarMin && topLeft.fY != SK_ScalarMin);
|
| topLeft.fX = topLeft.fY = SK_ScalarMin;
|
| continue;
|
| }
|
| break;
|
| }
|
| + firstPass = !topUnsortable || lastTopLeft != topLeft;
|
| SkTDArray<SkOpSpan*> chaseArray;
|
| do {
|
| if (current->activeWinding(index, endIndex)) {
|
|
|