Lines Matching refs:SkMatrix44
57 static bool nearly_equal(const SkMatrix44& a, const SkMatrix44& b) { in nearly_equal()
69 static bool is_identity(const SkMatrix44& m) { in is_identity()
70 SkMatrix44 identity(SkMatrix44::kIdentity_Constructor); in is_identity()
81 SkMatrix44* placeholderMatrix = new SkMatrix44; in test_constructor()
82 std::unique_ptr<SkMatrix44> deleteMe(placeholderMatrix); in test_constructor()
93 …SkMatrix44* testMatrix = new(placeholderMatrix) SkMatrix44(SkMatrix44::kUninitialized_Constructor); in test_constructor()
104 testMatrix = new(placeholderMatrix) SkMatrix44(SkMatrix44::kIdentity_Constructor); in test_constructor()
107 REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I()); in test_constructor()
110 SkMatrix44 scaleMatrix; in test_constructor()
113 testMatrix = new(&scaleMatrix) SkMatrix44(SkMatrix::I()); in test_constructor()
115 REPORTER_ASSERT(reporter, *testMatrix == SkMatrix44::I()); in test_constructor()
119 SkMatrix44 mat; in test_translate()
120 SkMatrix44 inverse; in test_translate()
123 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kIdentity_Mask)); in test_translate()
125 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kTranslate_Mask)); in test_translate()
127 REPORTER_ASSERT(reporter, bits_isonly(inverse.getType(), SkMatrix44::kTranslate_Mask)); in test_translate()
129 SkMatrix44 a,b,c; in test_translate()
145 SkMatrix44 mat; in test_scale()
146 SkMatrix44 inverse; in test_scale()
149 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kIdentity_Mask)); in test_scale()
151 REPORTER_ASSERT(reporter, bits_isonly(mat.getType(), SkMatrix44::kScale_Mask)); in test_scale()
153 REPORTER_ASSERT(reporter, bits_isonly(inverse.getType(), SkMatrix44::kScale_Mask)); in test_scale()
155 SkMatrix44 a,b,c; in test_scale()
170 static void make_i(SkMatrix44* mat) { mat->setIdentity(); } in make_i()
171 static void make_t(SkMatrix44* mat) { mat->setTranslate(1, 2, 3); } in make_t()
172 static void make_s(SkMatrix44* mat) { mat->setScale(1, 2, 3); } in make_s()
173 static void make_st(SkMatrix44* mat) { in make_st()
177 static void make_a(SkMatrix44* mat) { in make_a()
180 static void make_p(SkMatrix44* mat) { in make_p()
188 typedef void (*Make44Proc)(SkMatrix44*);
194 static void test_map2(skiatest::Reporter* reporter, const SkMatrix44& mat) { in test_map2()
213 SkMatrix44 mat; in test_map2()
222 SkMatrix44 matrix(SkMatrix44::kIdentity_Constructor); in test_gettype()
225 REPORTER_ASSERT(reporter, SkMatrix44::kIdentity_Mask == matrix.getType()); in test_gettype()
230 expectedMask = SkMatrix44::kScale_Mask; in test_gettype()
234 expectedMask |= SkMatrix44::kTranslate_Mask; in test_gettype()
238 expectedMask |= SkMatrix44::kAffine_Mask; in test_gettype()
242 REPORTER_ASSERT(reporter, matrix.getType() & SkMatrix44::kPerspective_Mask); in test_gettype()
257 SkMatrix44 rot; in test_common_angles()
270 SkMatrix44 a,b,c,d; in test_concat()
307 SkMatrix44 a(SkMatrix44::kIdentity_Constructor); in test_determinant()
311 SkMatrix44 b; in test_determinant()
314 SkMatrix44 c = b = a; in test_determinant()
320 SkMatrix44 d = a; in test_determinant()
324 SkMatrix44 e = a; in test_determinant()
332 SkMatrix44 inverse; in test_invert()
335 SkMatrix44 identity(SkMatrix44::kIdentity_Constructor); in test_invert()
344 SkMatrix44 translation; in test_invert()
354 SkMatrix44 scale; in test_invert()
364 SkMatrix44 scaleTranslation; in test_invert()
375 SkMatrix44 rotation; in test_invert()
378 SkMatrix44 expected; in test_invert()
387 SkMatrix44 affine; in test_invert()
400 SkMatrix44 perspective(SkMatrix44::kIdentity_Constructor); in test_invert()
411 SkMatrix44 affineAndPerspective(SkMatrix44::kIdentity_Constructor); in test_invert()
424 SkMatrix44 tinyScale(SkMatrix44::kIdentity_Constructor); in test_invert()
426 REPORTER_ASSERT(reporter, tinyScale.getType() == SkMatrix44::kScale_Mask); in test_invert()
430 SkMatrix44 tinyScaleTranslate(SkMatrix44::kIdentity_Constructor); in test_invert()
436 (SkMatrix44::kScale_Mask | SkMatrix44::kTranslate_Mask)); in test_invert()
440 SkMatrix44 tinyScalePerspective(SkMatrix44::kIdentity_Constructor); in test_invert()
444 SkMatrix44::kPerspective_Mask) == in test_invert()
445 SkMatrix44::kPerspective_Mask); in test_invert()
451 SkMatrix44 a,b; in test_transpose()
466 SkMatrix44 a; in test_get_set_double()
483 SkMatrix44 mat; in test_set_3x3()
498 SkMatrix44 a,b; in test_set_row_col_major()
534 SkMatrix44 a44; in test_3x3_conversion()
542 SkMatrix44 a44flattened = a33; in test_3x3_conversion()
543 SkMatrix44 expected44flattened; in test_3x3_conversion()
567 SkMatrix44 transform(SkMatrix44::kIdentity_Constructor); in test_has_perspective()
606 static SkVector4 mul_with_persp_divide(const SkMatrix44& transform, const SkVector4& target) { in mul_with_persp_divide()
619 const SkMatrix44& transform) { in empirically_preserves_2d_axis_alignment()
635 static void test(bool expected, skiatest::Reporter* reporter, const SkMatrix44& transform) { in test()
646 SkMatrix44 transform; in test_preserves_2d_axis_alignment()
647 SkMatrix44 transform2; in test_preserves_2d_axis_alignment()
808 SkMatrix44 mat; in test_toint()
823 SkMatrix44 mat; in DEF_TEST()
824 SkMatrix44 inverse; in DEF_TEST()
825 SkMatrix44 iden1; in DEF_TEST()
826 SkMatrix44 iden2; in DEF_TEST()
827 SkMatrix44 rot; in DEF_TEST()