aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsBuilderTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PathOpsBuilderTest.cpp')
-rw-r--r--tests/PathOpsBuilderTest.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/PathOpsBuilderTest.cpp b/tests/PathOpsBuilderTest.cpp
index e191ecee5e..e29b4bc473 100644
--- a/tests/PathOpsBuilderTest.cpp
+++ b/tests/PathOpsBuilderTest.cpp
@@ -301,3 +301,25 @@ DEF_TEST(Issue569540, reporter) {
SkPath result;
builder.resolve(&result);
}
+
+DEF_TEST(SkOpBuilderFuzz665, reporter) {
+ SkPath path;
+ path.setFillType(SkPath::kEvenOdd_FillType);
+path.moveTo(SkBits2Float(0xcc4264a7), SkBits2Float(0x4bb12e50)); // -5.0959e+07f, 2.32235e+07f
+path.lineTo(SkBits2Float(0xcc4264b0), SkBits2Float(0x4bb12e48)); // -5.0959e+07f, 2.32234e+07f
+path.lineTo(SkBits2Float(0xcc4264a7), SkBits2Float(0x4bb12e50)); // -5.0959e+07f, 2.32235e+07f
+path.close();
+ SkPath path1(path);
+ path.reset();
+ path.setFillType(SkPath::kWinding_FillType);
+path.moveTo(SkBits2Float(0x43213333), SkBits2Float(0x43080000)); // 161.2f, 136
+path.lineTo(SkBits2Float(0x43038000), SkBits2Float(0x43080000)); // 131.5f, 136
+path.cubicTo(SkBits2Float(0x43038000), SkBits2Float(0x42f00000), SkBits2Float(0x42f16666), SkBits2Float(0x42d53333), SkBits2Float(0x42d3cccd), SkBits2Float(0x42cd6666)); // 131.5f, 120, 120.7f, 106.6f, 105.9f, 102.7f
+path.lineTo(SkBits2Float(0x42e33333), SkBits2Float(0x42940000)); // 113.6f, 74
+ SkPath path2(path);
+ SkOpBuilder builder;
+ builder.add(path1, kUnion_SkPathOp);
+ builder.add(path2, kUnion_SkPathOp);
+ SkPath result;
+ builder.resolve(&result);
+}