Home | History | Annotate | Download | only in tests

Lines Matching refs:SkMatrix44

10 #include "SkMatrix44.h"
64 static bool nearly_equal(const SkMatrix44& a, const SkMatrix44& b) {
76 static bool is_identity(const SkMatrix44& m) {
77 SkMatrix44 identity(SkMatrix44::kIdentity_Constructor);
88 SkMatrix44* placeholderMatrix = new SkMatrix44(SkMatrix44::kUninitialized_Constructor);
89 SkAutoTDelete<SkMatrix44> deleteMe(placeholderMatrix);
100 SkMatrix44* testMatrix = new(placeholderMatrix) SkMatrix44(SkMatrix44::kUninitialized_Constructor);
111 testMatrix = new(placeholderMatrix) SkMatrix44(SkMatrix44::kIdentity_Constructor);
114 REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I());
118 SkMatrix44 mat(SkMatrix44::kUninitialized_Constructor);
119 SkMatrix44 inverse(SkMatrix44::kUninitialized_Constructor);
122 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kIdentity_Mask));
124 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kTranslate_Mask));
126 REPORTER_ASSERT(reporter, bits_isonly(inverse.getType(), SkMatrix44::kTranslate_Mask));
128 SkMatrix44 a(SkMatrix44::kUninitialized_Constructor);
129 SkMatrix44 b(SkMatrix44::kUninitialized_Constructor);
130 SkMatrix44 c(SkMatrix44::kUninitialized_Constructor);
146 SkMatrix44 mat(SkMatrix44::kUninitialized_Constructor);
147 SkMatrix44 inverse(SkMatrix44::kUninitialized_Constructor);
150 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kIdentity_Mask));
152 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kScale_Mask));
154 REPORTER_ASSERT(reporter, bits_isonly(inverse.getType(), SkMatrix44::kScale_Mask));
156 SkMatrix44 a(SkMatrix44::kUninitialized_Constructor);
157 SkMatrix44 b(SkMatrix44::kUninitialized_Constructor);
158 SkMatrix44 c(SkMatrix44::kUninitialized_Constructor);
173 static void make_i(SkMatrix44* mat) { mat->setIdentity(); }
174 static void make_t(SkMatrix44* mat) { mat->setTranslate(1, 2, 3); }
175 static void make_s(SkMatrix44* mat) { mat->setScale(1, 2, 3); }
176 static void make_st(SkMatrix44* mat) {
180 static void make_a(SkMatrix44* mat) {
183 static void make_p(SkMatrix44* mat) {
191 typedef void (*Make44Proc)(SkMatrix44*);
197 static void test_map2(skiatest::Reporter* reporter, const SkMatrix44& mat) {
216 SkMatrix44 mat(SkMatrix44::kUninitialized_Constructor);
225 SkMatrix44 matrix(SkMatrix44::kIdentity_Constructor);
228 REPORTER_ASSERT(reporter, SkMatrix44::kIdentity_Mask == matrix.getType());
233 expectedMask = SkMatrix44::kScale_Mask;
237 expectedMask |= SkMatrix44::kTranslate_Mask;
241 expectedMask |= SkMatrix44::kAffine_Mask;
245 REPORTER_ASSERT(reporter, matrix.getType() & SkMatrix44::kPerspective_Mask);
260 SkMatrix44 rot(SkMatrix44::kUninitialized_Constructor);
273 SkMatrix44 a(SkMatrix44::kUninitialized_Constructor);
274 SkMatrix44 b(SkMatrix44::kUninitialized_Constructor);
275 SkMatrix44 c(SkMatrix44::kUninitialized_Constructor);
276 SkMatrix44 d(SkMatrix44::kUninitialized_Constructor);
313 SkMatrix44 a(SkMatrix44::kIdentity_Constructor);
317 SkMatrix44 b(SkMatrix44::kUninitialized_Constructor);
320 SkMatrix44 c = b = a;
326 SkMatrix44 d = a;
330 SkMatrix44 e = a;
338 SkMatrix44 inverse(SkMatrix44::kUninitialized_Constructor);
341 SkMatrix44 identity(SkMatrix44::kIdentity_Constructor);
350 SkMatrix44 translation(SkMatrix44::kUninitialized_Constructor);
360 SkMatrix44 scale(SkMatrix44::kUninitialized_Constructor);
370 SkMatrix44 scaleTranslation(SkMatrix44::kUninitialized_Constructor);
381 SkMatrix44 rotation(SkMatrix44::kUninitialized_Constructor);
384 SkMatrix44 expected(SkMatrix44::kUninitialized_Constructor);
393 SkMatrix44 affine(SkMatrix44::kUninitialized_Constructor);
406 SkMatrix44 perspective(SkMatrix44::kIdentity_Constructor);
417 SkMatrix44 affineAndPerspective(SkMatrix44::kIdentity_Constructor);
432 SkMatrix44 a(SkMatrix44::kUninitialized_Constructor);
433 SkMatrix44 b(SkMatrix44::kUninitialized_Constructor);
448 SkMatrix44 a(SkMatrix44::kUninitialized_Constructor);
463 SkMatrix44 a(SkMatrix44::kUninitialized_Constructor);
464 SkMatrix44 b(SkMatrix44::kUninitialized_Constructor);
500 SkMatrix44 a44(SkMatrix44::kUninitialized_Constructor);
508 SkMatrix44 a44flattened = a33;
509 SkMatrix44 expected44flattened(SkMatrix44::kUninitialized_Constructor);
533 SkMatrix44 mat(SkMatrix44::kUninitialized_Constructor);
534 SkMatrix44 inverse(SkMatrix44::kUninitialized_Constructor);
535 SkMatrix44 iden1(SkMatrix44::kUninitialized_Constructor);
536 SkMatrix44 iden2(SkMatrix44::kUninitialized_Constructor);
537 SkMatrix44 rot(SkMatrix44::kUninitialized_Constructor);