Lines Matching refs:rgn
14 static void Union(SkRegion* rgn, const SkIRect& rect) { in Union() argument
15 rgn->op(rect, SkRegion::kUnion_Op); in Union()
18 #define TEST_NO_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, !rgn.intersects(rect)) argument
19 #define TEST_INTERSECT(rgn, rect) REPORTER_ASSERT(reporter, rgn.intersects(rect)) argument
20 #define TEST_NO_CONTAINS(rgn, rect) REPORTER_ASSERT(reporter, !rgn.contains(rect)) argument
74 SkRegion rgn; in test_fromchrome() local
75 Union(&rgn, SkIRect::MakeXYWH(0, 0, 10, 10)); in test_fromchrome()
76 Union(&rgn, SkIRect::MakeLTRB(5, 10, 20, 20)); in test_fromchrome()
77 TEST_INTERSECT(rgn, SkIRect::MakeXYWH(15, 0, 5, 11)); in test_fromchrome()
118 static void randRgn(SkRandom& rand, SkRegion* rgn, int n) { in randRgn() argument
119 rgn->setEmpty(); in randRgn()
121 rgn->op(randRect(rand), SkRegion::kUnion_Op); in randRgn()
142 static void test_contains_iter(skiatest::Reporter* reporter, const SkRegion& rgn) { in test_contains_iter() argument
143 SkRegion::Iterator iter(rgn); in test_contains_iter()
146 REPORTER_ASSERT(reporter, rgn.contains(r)); in test_contains_iter()
148 REPORTER_ASSERT(reporter, !rgn.contains(r)); in test_contains_iter()
171 static void test_intersects_iter(skiatest::Reporter* reporter, const SkRegion& rgn) { in test_intersects_iter() argument
172 SkRegion::Iterator iter(rgn); in test_intersects_iter()
175 REPORTER_ASSERT(reporter, rgn.intersects(r)); in test_intersects_iter()
177 REPORTER_ASSERT(reporter, rgn.intersects(r)); in test_intersects_iter()
414 SkRegion rgn; in DEF_TEST() local
415 rgn.op(negR, posR, SkRegion::kUnion_Op); in DEF_TEST()
419 REPORTER_ASSERT(reporter, rgn.isEmpty()); in DEF_TEST()
431 SkRegion rgn; in DEF_TEST() local
432 rgn.setPath(path, clip); in DEF_TEST()
434 REPORTER_ASSERT(reporter, clip == rgn); in DEF_TEST()
443 SkRegion rgn; in DEF_TEST() local
444 rgn.setPath(path, SkRegion(ir)); in DEF_TEST()
466 SkRegion rgn; in DEF_TEST() local
467 rgn.setPath(path, SkRegion{SkIRect{0, 0, 24, 24}}); in DEF_TEST()
485 REPORTER_ASSERT(reporter, !emptyIter.rgn()); in DEF_TEST()
495 REPORTER_ASSERT(reporter, resetIter.rgn()); in DEF_TEST()
496 REPORTER_ASSERT(reporter, resetIter.rgn()->isEmpty()); in DEF_TEST()
503 REPORTER_ASSERT(reporter, iter.rgn()); in DEF_TEST()
504 REPORTER_ASSERT(reporter, iter.rgn()->isEmpty()); in DEF_TEST()