Lines Matching refs:rgn
71 static void copyToMask(const SkRegion& rgn, SkMask* mask) { in copyToMask() argument
74 if (rgn.isEmpty()) { in copyToMask()
81 mask->fBounds = rgn.getBounds(); in copyToMask()
96 SkRegion tmpRgn(rgn); in copyToMask()
97 tmpRgn.translate(-rgn.getBounds().fLeft, -rgn.getBounds().fTop); in copyToMask()
133 static void make_rand_rgn(SkRegion* rgn, SkRandom& rand) { in make_rand_rgn() argument
136 rgn->op(rand_rect(rand, 100), SkRegion::kXOR_Op); in make_rand_rgn()
140 static bool operator==(const SkRegion& rgn, const SkAAClip& aaclip) { in operator ==() argument
143 copyToMask(rgn, &mask0); in operator ==()
152 static bool equalsAAClip(const SkRegion& rgn) { in equalsAAClip() argument
154 aaclip.setRegion(rgn); in equalsAAClip()
155 return rgn == aaclip; in equalsAAClip()
158 static void setRgnToPath(SkRegion* rgn, const SkPath& path) { in setRgnToPath() argument
161 rgn->setPath(path, SkRegion(ir)); in setRgnToPath()
168 SkRegion rgn; in test_rgn() local
169 make_rand_rgn(&rgn, rand); in test_rgn()
170 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn()
174 SkRegion rgn; in test_rgn() local
177 setRgnToPath(&rgn, path); in test_rgn()
178 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn()
185 setRgnToPath(&rgn, path); in test_rgn()
186 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn()