Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1439)

Unified Diff: tests/PathOpsBuilderTest.cpp

Issue 2046713003: fix pathops fuzz bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix most vexing parse Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsAngleTest.cpp ('k') | tests/PathOpsExtendedTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsBuilderTest.cpp
diff --git a/tests/PathOpsBuilderTest.cpp b/tests/PathOpsBuilderTest.cpp
index e191ecee5ec1106fdbdb2be020f80daca2641b34..957cfc70c826e82701c54314afe2441a33334c68 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);
+}
« no previous file with comments | « tests/PathOpsAngleTest.cpp ('k') | tests/PathOpsExtendedTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698