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

Unified Diff: tests/PathOpsOpTest.cpp

Issue 266063003: cubicline intersection binary search (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: typing cleanup Created 6 years, 7 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 | « tests/PathOpsCubicLineIntersectionTest.cpp ('k') | tools/pathops_sorter.htm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsOpTest.cpp
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp
index 86baea423cff84d4f5cb5a75aff0c248d580d8eb..75b6030aa5879f2b1d005f5e6393cf6e97287006 100644
--- a/tests/PathOpsOpTest.cpp
+++ b/tests/PathOpsOpTest.cpp
@@ -3329,10 +3329,30 @@ static void kari1(skiatest::Reporter* reporter, const char* filename) {
testPathOp(reporter, path1, path2, kDifference_PathOp, filename);
}
+static void issue2504(skiatest::Reporter* reporter, const char* filename) {
+ SkPath path1;
+ path1.moveTo(34.2421875, -5.976562976837158203125);
+ path1.lineTo(35.453121185302734375, 0);
+ path1.lineTo(31.9375, 0);
+ path1.close();
+
+ SkPath path2;
+ path2.moveTo(36.71843719482421875, 0.8886508941650390625);
+ path2.cubicTo(36.71843719482421875, 0.8886508941650390625,
+ 35.123386383056640625, 0.554015457630157470703125,
+ 34.511409759521484375, -0.1152553558349609375);
+ path2.cubicTo(33.899425506591796875, -0.7845261096954345703125,
+ 34.53484344482421875, -5.6777553558349609375,
+ 34.53484344482421875, -5.6777553558349609375);
+ path2.close();
+ testPathOp(reporter, path1, path2, kUnion_PathOp, filename);
+}
+
static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
static struct TestDesc tests[] = {
+ TEST(issue2504),
TEST(kari1),
TEST(quadOp10i),
#if 0 // FIXME: serpentine curve is ordered the wrong way
« no previous file with comments | « tests/PathOpsCubicLineIntersectionTest.cpp ('k') | tools/pathops_sorter.htm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698