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

Unified Diff: tests/PathTest.cpp

Issue 1533873002: Use the unswapped end point y for early out case in winding_line (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 464943b8dcc8f271d211a59a6f2d7c1e8a6c422a..aa2ffdb32f106cecb913e2acf52701d6cf5921a9 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -3542,6 +3542,16 @@ static void test_contains(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, !p.contains(7, 7));
p.reset();
p.moveTo(4, 4);
+ p.lineTo(8, 4);
+ p.lineTo(8, 8);
+ p.lineTo(4, 8);
+ // test on vertices
+ REPORTER_ASSERT(reporter, p.contains(4, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 4));
+ REPORTER_ASSERT(reporter, p.contains(8, 8));
+ REPORTER_ASSERT(reporter, p.contains(4, 8));
+ p.reset();
+ p.moveTo(4, 4);
p.lineTo(6, 8);
p.lineTo(2, 8);
// test on edge
« 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