Home | History | Annotate | Download | only in tests

Lines Matching defs:region

64     // These test SkRegion::contains(Rect) and SkRegion::contains(Region)
233 DEF_TEST(Region, reporter) {
268 static void test_write(const SkRegion& region, skiatest::Reporter* r) {
269 const size_t bytesNeeded = region.writeToMemory(nullptr);
271 const size_t bytesWritten = region.writeToMemory(storage.get());
276 // Test an empty region.
277 SkRegion region;
278 REPORTER_ASSERT(r, region.isEmpty());
279 test_write(region, r);
281 // Test a rectangular region
282 bool nonEmpty = region.setRect(0, 0, 50, 50);
284 REPORTER_ASSERT(r, region.isRect());
285 test_write(region, r);
287 // Test a complex region
288 nonEmpty = region.op(50, 50, 100, 100, SkRegion::kUnion_Op);
290 REPORTER_ASSERT(r, region.isComplex());
291 test_write(region, r);