Index: tests/PathTest.cpp |
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp |
index 7db65a899f24f310dc8e1232a97ff6fb7d4f7352..a868d93d78c3c6e740f548dae88377ee47bc9ddd 100644 |
--- a/tests/PathTest.cpp |
+++ b/tests/PathTest.cpp |
@@ -2475,6 +2475,20 @@ static void test_iter(skiatest::Reporter* reporter) { |
REPORTER_ASSERT(reporter, SkPath::kDone_Verb == iter.next(pts, true)); |
// The GM degeneratesegments.cpp test is more extensive |
+ |
+ // Test out mixed degenerate and non-degenerate geometry with Conics |
+ const SkVector radii[4] = { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 100, 100 } }; |
+ SkRect r = SkRect::MakeWH(100, 100); |
+ SkRRect rr; |
+ rr.setRectRadii(r, radii); |
+ p.reset(); |
+ p.addRRect(rr); |
+ iter.setPath(p, false); |
+ REPORTER_ASSERT(reporter, SkPath::kMove_Verb == iter.next(pts)); |
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts)); |
+ REPORTER_ASSERT(reporter, SkPath::kLine_Verb == iter.next(pts)); |
+ REPORTER_ASSERT(reporter, SkPath::kConic_Verb == iter.next(pts)); |
robertphillips
2015/02/23 18:53:47
This next line will trigger a valgrind complaint w
|
+ REPORTER_ASSERT(reporter, SK_ScalarRoot2Over2 == iter.conicWeight()); |
} |
static void test_raw_iter(skiatest::Reporter* reporter) { |