static SkIRect rand_rect(SkMWCRandom& rand, int n) { int x = rand.nextS() % n; int y = rand.nextS() % n; int w = rand.nextU() % n; int h = rand.nextU() % n; return SkIRect::MakeXYWH(x, y, w, h); }
static void rand_array(SkMWCRandom& rand, int array[], int n) { for (int j = 0; j < n; j++) { array[j] = rand.nextS() & 0xFF; } }