diff options
-rwxr-xr-x | src/pathops/SkOpCoincidence.cpp | 3 | ||||
-rw-r--r-- | tests/PathOpsBuilderTest.cpp | 31 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp index f56847787c..5687dd415f 100755 --- a/src/pathops/SkOpCoincidence.cpp +++ b/src/pathops/SkOpCoincidence.cpp @@ -390,6 +390,9 @@ bool SkOpCoincidence::apply() { SkOpSegment* oSegment = oStart->segment(); bool operandSwap = segment->operand() != oSegment->operand(); if (flipped) { + if (oEnd->deleted()) { + continue; + } do { SkOpSpanBase* oNext = oStart->next(); if (oNext == oEnd) { diff --git a/tests/PathOpsBuilderTest.cpp b/tests/PathOpsBuilderTest.cpp index 5cf49cf637..e191ecee5e 100644 --- a/tests/PathOpsBuilderTest.cpp +++ b/tests/PathOpsBuilderTest.cpp @@ -270,3 +270,34 @@ DEF_TEST(Fuzz846, reporter) { SkPath result; builder.resolve(&result); } + +DEF_TEST(Issue569540, reporter) { + SkPath path1; + path1.moveTo(5, -225); + path1.lineTo(-225, 7425); + path1.lineTo(7425, 7425); + path1.lineTo(7425, -225); + path1.lineTo(-225, -225); + path1.lineTo(5, -225); + path1.close(); + + SkPath path2; + path2.moveTo(5940, 2790); + path2.lineTo(5940, 2160); + path2.lineTo(5970, 1980); + path2.lineTo(5688, 773669888); + path2.lineTo(5688, 2160); + path2.lineTo(5688, 2430); + path2.lineTo(5400, 4590); + path2.lineTo(5220, 4590); + path2.lineTo(5220, 4920); + path2.cubicTo(5182.22900390625f, 4948.328125f, 5160, 4992.78662109375f, 5160, 5040.00048828125f); + path2.lineTo(5940, 2790); + path2.close(); + + SkOpBuilder builder; + builder.add(path1, kUnion_SkPathOp); + builder.add(path2, kUnion_SkPathOp); + SkPath result; + builder.resolve(&result); +} |