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

Unified Diff: tests/PathTest.cpp

Issue 573763002: Fix convexicator bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Handle kInvalid_DirChange in switch statement 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 121bce9a1bfdef4155505e4594881ab91f41e8a4..1f0422d788267567891060f071cbbe6f5c27bcbd 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