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

Unified Diff: tests/PathTest.cpp

Issue 2485243002: Do not call blitV with 0 height (Closed)
Patch Set: Add unit test 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 a3fcb3a574c49a970bf7a66c912512f246252622..b79b5cccd9fb81975557e1f831cabb9bdf0efa8f 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -4244,6 +4244,22 @@ static void test_crbug_629455(skiatest::Reporter* reporter) {
surface->getCanvas()->drawPath(path, paint);
}
+static void test_fuzz_crbug_662952(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f
+ path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411c0000)); // 8.65f, 9.75f
+ path.lineTo(SkBits2Float(0x410a6666), SkBits2Float(0x411e6666)); // 8.65f, 9.9f
+ path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411e6666)); // 8.6f, 9.9f
+ path.lineTo(SkBits2Float(0x4109999a), SkBits2Float(0x411c0000)); // 8.6f, 9.75f
+ path.close();
+
+ auto surface = SkSurface::MakeRasterN32Premul(100, 100);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ surface->getCanvas()->clipPath(path, true);
+ surface->getCanvas()->drawRectCoords(0, 0, 100, 100, paint);
+}
+
static void test_interp(skiatest::Reporter* reporter) {
SkPath p1, p2, out;
REPORTER_ASSERT(reporter, p1.isInterpolatable(p2));
@@ -4298,6 +4314,7 @@ DEF_TEST(Paths, reporter) {
test_crbug_629455(reporter);
test_fuzz_crbug_627414(reporter);
test_path_crbug364224();
+ test_fuzz_crbug_662952(reporter);
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