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

Unified Diff: tests/PathTest.cpp

Issue 727283003: Fix yet another convexicator issue (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
« src/core/SkPath.cpp ('K') | « 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 94b91d261be37a3396f184f28202de836dfbb26b..3c7a238570bc4ba7000a3b4bcb9ec35f225ecfe2 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -1206,6 +1206,20 @@ static void test_convexity2(skiatest::Reporter* reporter) {
degenerateConcave.lineTo(41.446522f, 376.25f);
check_convexity(reporter, degenerateConcave, SkPath::kConcave_Convexity);
check_direction(reporter, degenerateConcave, SkPath::kUnknown_Direction);
+
+ // http://crbug.com/433683
+ SkPath badFirstVector;
+ badFirstVector.moveTo(501.087708f, 319.610352f);
+ badFirstVector.lineTo(501.087708f, 319.610352f);
+ badFirstVector.cubicTo(501.087677f, 319.610321f, 449.271606f, 258.078674f, 395.084564f, 198.711182f);
+ badFirstVector.cubicTo(358.967072f, 159.140717f, 321.910553f, 120.650436f, 298.442322f, 101.955399f);
+ badFirstVector.lineTo(301.557678f, 98.044601f);
+ badFirstVector.cubicTo(325.283844f, 116.945084f, 362.615204f, 155.720825f, 398.777557f, 195.340454f);
+ badFirstVector.cubicTo(453.031860f, 254.781662f, 504.912262f, 316.389618f, 504.912292f, 316.389648f);
+ badFirstVector.lineTo(504.912292f, 316.389648f);
+ badFirstVector.lineTo(501.087708f, 319.610352f);
+ badFirstVector.close();
+ check_convexity(reporter, badFirstVector, SkPath::kConcave_Convexity);
}
static void check_convex_bounds(skiatest::Reporter* reporter, const SkPath& p,
« src/core/SkPath.cpp ('K') | « src/core/SkPath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698