Lines Matching refs:rgn
59 static void copyToMask(const SkRegion& rgn, SkMask* mask) { in copyToMask() argument
62 if (rgn.isEmpty()) { in copyToMask()
69 mask->fBounds = rgn.getBounds(); in copyToMask()
84 SkRegion tmpRgn(rgn); in copyToMask()
85 tmpRgn.translate(-rgn.getBounds().fLeft, -rgn.getBounds().fTop); in copyToMask()
100 static void make_rand_rgn(SkRegion* rgn, SkRandom& rand) { in make_rand_rgn() argument
103 rgn->op(rand_rect(rand, 100), SkRegion::kXOR_Op); in make_rand_rgn()
107 static bool operator==(const SkRegion& rgn, const SkAAClip& aaclip) { in operator ==() argument
110 copyToMask(rgn, &mask0); in operator ==()
119 static bool equalsAAClip(const SkRegion& rgn) { in equalsAAClip() argument
121 aaclip.setRegion(rgn); in equalsAAClip()
122 return rgn == aaclip; in equalsAAClip()
125 static void setRgnToPath(SkRegion* rgn, const SkPath& path) { in setRgnToPath() argument
128 rgn->setPath(path, SkRegion(ir)); in setRgnToPath()
135 SkRegion rgn; in test_rgn() local
136 make_rand_rgn(&rgn, rand); in test_rgn()
137 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn()
141 SkRegion rgn; in test_rgn() local
144 setRgnToPath(&rgn, path); in test_rgn()
145 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn()
152 setRgnToPath(&rgn, path); in test_rgn()
153 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn()