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

Unified Diff: tests/PathTest.cpp

Issue 2312923002: compare degenerates with tolerance (Closed)
Patch Set: Created 4 years, 3 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/core/SkGeometry.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathTest.cpp
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 429d9e980fa707b4fdfd05b20aa97799a6b8dd38..032b646d4e194314f61be4caf0e58c7b9b791401 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -138,6 +138,25 @@ static void test_fuzz_crbug_638223() {
canvas->drawPath(path, paint);
}
+static void test_fuzz_crbug_643933() {
+ auto surface(SkSurface::MakeRasterN32Premul(250, 250));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(0, 0);
+ path.conicTo(SkBits2Float(0x002001f2), SkBits2Float(0x4161ffff), // 2.93943e-39f, 14.125f
+ SkBits2Float(0x49f7224d), SkBits2Float(0x45eec8df), // 2.02452e+06f, 7641.11f
+ SkBits2Float(0x721aee0c)); // 3.0687e+30f
+ canvas->drawPath(path, paint);
+ path.reset();
+ path.moveTo(0, 0);
+ path.conicTo(SkBits2Float(0x00007ff2), SkBits2Float(0x4169ffff), // 4.58981e-41f, 14.625f
+ SkBits2Float(0x43ff2261), SkBits2Float(0x41eeea04), // 510.269f, 29.8643f
+ SkBits2Float(0x5d06eff8)); // 6.07704e+17f
+ canvas->drawPath(path, paint);
+}
+
/**
* In debug mode, this path was causing an assertion to fail in
* SkPathStroker::preJoinTo() and, in Release, the use of an unitialized value.
@@ -4256,6 +4275,7 @@ DEF_TEST(PathContains, reporter) {
}
DEF_TEST(Paths, reporter) {
+ test_fuzz_crbug_643933();
test_sect_with_horizontal_needs_pinning();
test_crbug_629455(reporter);
test_fuzz_crbug_627414(reporter);
« no previous file with comments | « src/core/SkGeometry.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698