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

Unified Diff: tests/PathTest.cpp

Issue 597963002: Fix convexicator bug (Closed) Base URL: https://skia.googlesource.com/skia.git@m38_2125
Patch Set: Created 6 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/SkPath.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 0de64b06febf5a145245bfa0a9f64eec0229a00e..798185c20ef26d8bb5380327164598cb710e4778 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -1195,6 +1195,17 @@ static void test_convexity2(skiatest::Reporter* reporter) {
stroke.applyToPath(&strokedSin, strokedSin);
check_convexity(reporter, strokedSin, SkPath::kConcave_Convexity);
check_direction(reporter, strokedSin, kDontCheckDir);
+
+ // http://crbug.com/412640
+ SkPath degenerateConcave;
+ degenerateConcave.moveTo(148.67912f, 191.875f);
+ degenerateConcave.lineTo(470.37695f, 7.5f);
+ degenerateConcave.lineTo(148.67912f, 191.875f);
+ degenerateConcave.lineTo(41.446522f, 376.25f);
+ degenerateConcave.lineTo(-55.971577f, 460.0f);
+ degenerateConcave.lineTo(41.446522f, 376.25f);
+ check_convexity(reporter, degenerateConcave, SkPath::kConcave_Convexity);
+ check_direction(reporter, degenerateConcave, SkPath::kUnknown_Direction);
}
static void check_convex_bounds(skiatest::Reporter* reporter, const SkPath& p,
« no previous file with comments | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698