Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: cc/test/geometry_test_utils.h

Issue 2971503002: Transform animations should not collapse by default when interpolating (Closed)
Patch Set: . Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/test/geometry_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TEST_GEOMETRY_TEST_UTILS_H_ 5 #ifndef CC_TEST_GEOMETRY_TEST_UTILS_H_
6 #define CC_TEST_GEOMETRY_TEST_UTILS_H_ 6 #define CC_TEST_GEOMETRY_TEST_UTILS_H_
7 7
8 #include "cc/cc_export.h"
9
8 namespace gfx { 10 namespace gfx {
9 class Transform; 11 class Transform;
10 } 12 }
11 13
12 namespace cc { 14 namespace cc {
13 15
14 // These are macros instead of functions so that we get useful line numbers 16 // These are macros instead of functions so that we get useful line numbers
15 // where a test failed. 17 // where a test failed.
16 #define EXPECT_FLOAT_RECT_EQ(expected, actual) \ 18 #define EXPECT_FLOAT_RECT_EQ(expected, actual) \
17 do { \ 19 do { \
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54337 91 // and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54337
90 void ExpectTransformationMatrixEq(const gfx::Transform& expected, 92 void ExpectTransformationMatrixEq(const gfx::Transform& expected,
91 const gfx::Transform& actual); 93 const gfx::Transform& actual);
92 94
93 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \ 95 #define EXPECT_TRANSFORMATION_MATRIX_EQ(expected, actual) \
94 do { \ 96 do { \
95 SCOPED_TRACE(""); \ 97 SCOPED_TRACE(""); \
96 ExpectTransformationMatrixEq(expected, actual); \ 98 ExpectTransformationMatrixEq(expected, actual); \
97 } while (false) 99 } while (false)
98 100
101 void ExpectTransformationMatrixNear(const gfx::Transform& expected,
102 const gfx::Transform& actual,
103 float abs_error);
104
105 #define EXPECT_TRANSFORMATION_MATRIX_NEAR(expected, actual, abs_error) \
106 do { \
107 SCOPED_TRACE(""); \
108 ExpectTransformationMatrixNear(expected, actual, abs_error); \
109 } while (false)
110
99 // Should be used in test code only, for convenience. Production code should use 111 // Should be used in test code only, for convenience. Production code should use
100 // the gfx::Transform::GetInverse() API. 112 // the gfx::Transform::GetInverse() API.
101 gfx::Transform Inverse(const gfx::Transform& transform); 113 gfx::Transform Inverse(const gfx::Transform& transform);
102 114
103 } // namespace cc 115 } // namespace cc
104 116
105 #endif // CC_TEST_GEOMETRY_TEST_UTILS_H_ 117 #endif // CC_TEST_GEOMETRY_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « cc/test/animation_timelines_test_common.h ('k') | cc/test/geometry_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698