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

Unified Diff: tests/PathOpsBuilderTest.cpp

Issue 2168963002: fix builder fuzz (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « src/pathops/SkOpBuilder.cpp ('k') | no next file » | 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 8547d850484262175c4424f795d67417349089f3..25acfab765e2fa8f8d23bc1598ecbdf369f9383f 100644
--- a/tests/PathOpsBuilderTest.cpp
+++ b/tests/PathOpsBuilderTest.cpp
@@ -344,3 +344,20 @@ DEF_TEST(SkOpBuilder618991, reporter) {
builder.add(path1, SkPathOp::kUnion_SkPathOp);
builder.resolve(&path0);
}
+
+DEF_TEST(SkOpBuilderKFuzz1, reporter) {
+ SkPath path;
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.lineTo(SkBits2Float(0x39008001), SkBits2Float(0xd31fbc1d)); // 0.000122547f, -6.86056e+11f
+path.conicTo(SkBits2Float(0x246a205a), SkBits2Float(0x0080d3fb), SkBits2Float(0xce000001), SkBits2Float(0x04d31fbc), SkBits2Float(0x57a82c00)); // 5.07681e-17f, 1.1831e-38f, -5.36871e+08f, 4.9635e-36f, 3.69814e+14f
+ SkPath path0(path);
+ path.reset();
+path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0
+path.cubicTo(SkBits2Float(0x80d3f924), SkBits2Float(0xcecece4f), SkBits2Float(0xcececece), SkBits2Float(0xcececece), SkBits2Float(0x9a9a9ace), SkBits2Float(0x9a9a9a9a)); // -1.94667e-38f, -1.73481e+09f, -1.73483e+09f, -1.73483e+09f, -6.3943e-23f, -6.39427e-23f
+path.moveTo(SkBits2Float(0x9a9a019a), SkBits2Float(0xa59a9a9a)); // -6.36955e-23f, -2.68195e-16f
+ SkPath path1(path);
+SkOpBuilder builder;
+ builder.add(path0, SkPathOp::kUnion_SkPathOp);
+ builder.add(path1, SkPathOp::kUnion_SkPathOp);
+ builder.resolve(&path);
+}
« no previous file with comments | « src/pathops/SkOpBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698