Index: cc/test/geometry_test_utils.cc |
diff --git a/cc/test/geometry_test_utils.cc b/cc/test/geometry_test_utils.cc |
index 35cd0dd39feffe153b2ad8379f4848947e509d56..803e46417f32c6e34757786788672fbe8e010a88 100644 |
--- a/cc/test/geometry_test_utils.cc |
+++ b/cc/test/geometry_test_utils.cc |
@@ -6,6 +6,7 @@ |
#include <public/WebTransformationMatrix.h> |
+#include "base/logging.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "ui/gfx/transform.h" |
@@ -57,4 +58,12 @@ void ExpectTransformationMatrixEq(const gfx::Transform& expected, |
EXPECT_FLOAT_EQ((expected).matrix().getDouble(3, 3), (actual).matrix().getDouble(3, 3)); |
} |
+gfx::Transform inverse(const gfx::Transform& transform) |
+{ |
+ gfx::Transform result; |
danakj
2012/12/19 05:23:06
I guess this should be kSkipInitialization as well
|
+ bool invertedSuccessfully = transform.GetInverse(&result); |
+ DCHECK(invertedSuccessfully); |
+ return result; |
+} |
+ |
} // namespace cc |