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

Unified Diff: tests/PathTest.cpp

Issue 2482193004: Tighten SkAAClip Bounds by Path Bounds (Closed)
Patch Set: Fix 100 line limit Created 4 years, 1 month 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/SkScan_AAAPath.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 b8247edbc356de7e7fd2834bb8a08f4c21ffab99..85bd80487405702838c19b0e48999e8380f1b8ac 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -170,6 +170,34 @@ static void test_fuzz_crbug_647922() {
canvas->drawPath(path, paint);
}
+static void test_fuzz_crbug_662780() {
+ auto surface(SkSurface::MakeRasterN32Premul(250, 250));
+ SkCanvas* canvas = surface->getCanvas();
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkPath path;
+ path.moveTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000)); // 8, 158
+ path.lineTo(SkBits2Float(0x41000000), SkBits2Float(0x42f00000)); // 8, 120
+ // 8, 8, 8.00002f, 8, 0.707107f
+ path.conicTo(SkBits2Float(0x41000000), SkBits2Float(0x41000000),
+ SkBits2Float(0x41000010), SkBits2Float(0x41000000), SkBits2Float(0x3f3504f3));
+ path.lineTo(SkBits2Float(0x439a0000), SkBits2Float(0x41000000)); // 308, 8
+ // 308, 8, 308, 8, 0.707107f
+ path.conicTo(SkBits2Float(0x439a0000), SkBits2Float(0x41000000),
+ SkBits2Float(0x439a0000), SkBits2Float(0x41000000), SkBits2Float(0x3f3504f3));
+ path.lineTo(SkBits2Float(0x439a0000), SkBits2Float(0x431e0000)); // 308, 158
+ // 308, 158, 308, 158, 0.707107f
+ path.conicTo(SkBits2Float(0x439a0000), SkBits2Float(0x431e0000),
+ SkBits2Float(0x439a0000), SkBits2Float(0x431e0000), SkBits2Float(0x3f3504f3));
+ path.lineTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000)); // 8, 158
+ // 8, 158, 8, 158, 0.707107f
+ path.conicTo(SkBits2Float(0x41000000), SkBits2Float(0x431e0000),
+ SkBits2Float(0x41000000), SkBits2Float(0x431e0000), SkBits2Float(0x3f3504f3));
+ path.close();
+ canvas->clipPath(path, true);
+ canvas->drawRectCoords(0, 0, 250, 250, paint);
+}
+
/**
* In debug mode, this path was causing an assertion to fail in
* SkPathStroker::preJoinTo() and, in Release, the use of an unitialized value.
@@ -4330,6 +4358,7 @@ DEF_TEST(Paths, reporter) {
test_path_crbug364224();
test_fuzz_crbug_662952(reporter);
test_fuzz_crbug_662730(reporter);
+ test_fuzz_crbug_662780();
SkTSize<SkScalar>::Make(3,4);
« no previous file with comments | « src/core/SkScan_AAAPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698