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

Unified Diff: tests/PathTest.cpp

Issue 2159223005: re-chop if we fail on a big-bad-cubic (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/core/SkEdgeClipper.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 44b67860195c01c4c6d4c74549489a39253f3860..8f98e6abaa05a1e03e377014144ef24c3eb3391d 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -4129,6 +4129,21 @@ public:
}
};
+static void test_crbug_629455(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.cubicTo(SkBits2Float(0xcdcdcd00), SkBits2Float(0xcdcdcdcd),
+ SkBits2Float(0xcdcdcdcd), SkBits2Float(0xcdcdcdcd),
+ SkBits2Float(0x423fcdcd), SkBits2Float(0x40ed9341));
+// AKA: cubicTo(-4.31596e+08f, -4.31602e+08f, -4.31602e+08f, -4.31602e+08f, 47.951f, 7.42423f);
+ path.lineTo(0, 0);
+
+ auto surface = SkSurface::MakeRasterN32Premul(100, 100);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ surface->getCanvas()->drawPath(path, paint);
+}
+
static void test_interp(skiatest::Reporter* reporter) {
SkPath p1, p2, out;
REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));
@@ -4177,6 +4192,7 @@ DEF_TEST(PathContains, reporter) {
}
DEF_TEST(Paths, reporter) {
+ test_crbug_629455(reporter);
test_fuzz_crbug_627414(reporter);
test_path_crbug364224();
« no previous file with comments | « src/core/SkEdgeClipper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698