Lines Matching refs:mat
27 static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) { in rand_matrix() argument
28 mat->setIdentity(); in rand_matrix()
30 mat->postTranslate(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix()
33 mat->postScale(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix()
36 mat->postRotate(rand.nextSScalar1() * 360); in rand_matrix()
39 mat->setPerspX(rand.nextSScalar1()); in rand_matrix()
40 mat->setPerspY(rand.nextSScalar1()); in rand_matrix()
50 SkMatrix mat; in test_treatAsSprite() local
62 rand_matrix(&mat, rand, SkMatrix::kTranslate_Mask); in test_treatAsSprite()
65 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, sampling, noaaPaint)); in test_treatAsSprite()
71 rand_matrix(&mat, rand, SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask); in test_treatAsSprite()
74 REPORTER_ASSERT(reporter, !SkTreatAsSprite(mat, size, sampling, noaaPaint)); in test_treatAsSprite()
75 REPORTER_ASSERT(reporter, !SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()
82 mat.setTranslate(tooMuchSubpixel, 0); in test_treatAsSprite()
83 REPORTER_ASSERT(reporter, !SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()
84 mat.setTranslate(0, tooMuchSubpixel); in test_treatAsSprite()
85 REPORTER_ASSERT(reporter, !SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()
88 mat.setTranslate(tinySubPixel, 0); in test_treatAsSprite()
89 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()
90 mat.setTranslate(0, tinySubPixel); in test_treatAsSprite()
91 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()
95 mat.setScale(bigScale, bigScale); in test_treatAsSprite()
96 REPORTER_ASSERT(reporter, !SkTreatAsSprite(mat, size, sampling, noaaPaint)); in test_treatAsSprite()
97 REPORTER_ASSERT(reporter, !SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()
101 mat.setScale(smallScale, smallScale); in test_treatAsSprite()
102 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, sampling, noaaPaint)); in test_treatAsSprite()
103 REPORTER_ASSERT(reporter, !SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()
107 mat.setScale(tinyScale, tinyScale); in test_treatAsSprite()
108 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, sampling, noaaPaint)); in test_treatAsSprite()
109 REPORTER_ASSERT(reporter, SkTreatAsSprite(mat, size, sampling, aaPaint)); in test_treatAsSprite()