diff options
author | 2016-08-17 07:37:57 -0700 | |
---|---|---|
committer | 2016-08-17 07:37:57 -0700 | |
commit | ff863bc550a8738c9c2667be225e653636617a90 (patch) | |
tree | c575dbb3db87f8251004066c4bff046f97ff2f09 /tests/PathTest.cpp | |
parent | bf63e616a67e8992e150d982cfcd6403994f39ad (diff) |
move private test for sect_with_horizontal into unittests
BUG=638575
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250353004
Review-Url: https://codereview.chromium.org/2250353004
Diffstat (limited to 'tests/PathTest.cpp')
-rw-r--r-- | tests/PathTest.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index c76276080c..8a3022ccfe 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -97,6 +97,20 @@ static void make_path_crbug364224_simplified(SkPath* path) { path->close(); } +static void test_sect_with_horizontal_needs_pinning() { + // Test that sect_with_horizontal in SkLineClipper.cpp needs to pin after computing the + // intersection. + SkPath path; + path.reset(); + path.moveTo(-540000, -720000); + path.lineTo(-9.10000017e-05f, 9.99999996e-13f); + path.lineTo(1, 1); + + // Without the pinning code in sect_with_horizontal(), this would assert in the lineclipper + SkPaint paint; + SkSurface::MakeRasterN32Premul(10, 10)->getCanvas()->drawPath(path, paint); +} + static void test_path_crbug364224() { SkPath path; SkPaint paint; @@ -4228,6 +4242,7 @@ DEF_TEST(PathContains, reporter) { } DEF_TEST(Paths, reporter) { + test_sect_with_horizontal_needs_pinning(); test_crbug_629455(reporter); test_fuzz_crbug_627414(reporter); test_path_crbug364224(); |