Lines Matching refs:rand
64 static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) { in rand_matrix() argument
67 mat->postTranslate(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix()
70 mat->postScale(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix()
73 mat->postRotate(rand.nextSScalar1() * 360); in rand_matrix()
76 mat->setPerspX(rand.nextSScalar1()); in rand_matrix()
77 mat->setPerspY(rand.nextSScalar1()); in rand_matrix()
81 static void rand_size(SkISize* size, SkRandom& rand) { in rand_size() argument
82 size->set(rand.nextU() & 0xFFFF, rand.nextU() & 0xFFFF); in rand_size()
89 SkRandom rand; in test_treatAsSprite() local
97 rand_matrix(&mat, rand, SkMatrix::kTranslate_Mask); in test_treatAsSprite()
99 rand_size(&size, rand); in test_treatAsSprite()
106 rand_matrix(&mat, rand, SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask); in test_treatAsSprite()
108 rand_size(&size, rand); in test_treatAsSprite()