Lines Matching refs:gMatrices
18 static SkMatrix gMatrices[5]; in test_matrix() local
23 gMatrices[0].reset(); in test_matrix()
24 gMatrices[1].setTranslate(SkIntToScalar(-100), SkIntToScalar(100)); in test_matrix()
25 gMatrices[2].setRotate(SkIntToScalar(17)); in test_matrix()
26 gMatrices[3].setRotate(SkIntToScalar(185)); in test_matrix()
27 gMatrices[3].postTranslate(SkIntToScalar(66), SkIntToScalar(-33)); in test_matrix()
28 gMatrices[3].postScale(SkIntToScalar(2), SK_ScalarHalf); in test_matrix()
31 gMatrices[4].setRotate(SkIntToScalar(215)); in test_matrix()
32 gMatrices[4].set(SkMatrix::kMPersp0, 0.00013f); in test_matrix()
33 gMatrices[4].set(SkMatrix::kMPersp1, -0.000039f); in test_matrix()
36 uint32_t count = static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)); in test_matrix()
38 return gMatrices[random->nextULessThan(count)]; in test_matrix()
40 return gMatrices[random->nextULessThan(count - kPerspectiveCount)]; in test_matrix()
48 static SkMatrix gMatrices[5]; in TestMatrixPreservesRightAngles() local
53 gMatrices[0].reset(); in TestMatrixPreservesRightAngles()
55 gMatrices[1].setTranslate(SkIntToScalar(-100), SkIntToScalar(100)); in TestMatrixPreservesRightAngles()
57 gMatrices[2].setScale(SkIntToScalar(17), SkIntToScalar(17)); in TestMatrixPreservesRightAngles()
59 gMatrices[3].setScale(SkIntToScalar(-17), SkIntToScalar(-17)); in TestMatrixPreservesRightAngles()
60 gMatrices[3].postTranslate(SkIntToScalar(66), SkIntToScalar(-33)); in TestMatrixPreservesRightAngles()
62 gMatrices[4].reset(); in TestMatrixPreservesRightAngles()
63 gMatrices[4].setScale(SkIntToScalar(-1), SkIntToScalar(-1)); in TestMatrixPreservesRightAngles()
64 gMatrices[4].setRotate(47); in TestMatrixPreservesRightAngles()
66 for (size_t i = 0; i < SK_ARRAY_COUNT(gMatrices); i++) { in TestMatrixPreservesRightAngles()
67 SkASSERT(gMatrices[i].preservesRightAngles()); in TestMatrixPreservesRightAngles()
70 return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; in TestMatrixPreservesRightAngles()
74 static SkMatrix gMatrices[6]; in TestMatrixRectStaysRect() local
79 gMatrices[0].reset(); in TestMatrixRectStaysRect()
81 gMatrices[1].setTranslate(SkIntToScalar(-100), SkIntToScalar(100)); in TestMatrixRectStaysRect()
83 gMatrices[2].setScale(SkIntToScalar(17), SkIntToScalar(17)); in TestMatrixRectStaysRect()
85 gMatrices[3].setScale(SkIntToScalar(-17), SkIntToScalar(-17)); in TestMatrixRectStaysRect()
86 gMatrices[3].postTranslate(SkIntToScalar(66), SkIntToScalar(-33)); in TestMatrixRectStaysRect()
88 gMatrices[4].setScale(SkIntToScalar(-1), SkIntToScalar(-1)); in TestMatrixRectStaysRect()
90 gMatrices[5].setRotate(90); in TestMatrixRectStaysRect()
92 for (size_t i = 0; i < SK_ARRAY_COUNT(gMatrices); i++) { in TestMatrixRectStaysRect()
93 SkASSERT(gMatrices[i].rectStaysRect()); in TestMatrixRectStaysRect()
96 return gMatrices[random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(gMatrices)))]; in TestMatrixRectStaysRect()