Index: cc/test/geometry_test_utils.cc |
diff --git a/cc/test/geometry_test_utils.cc b/cc/test/geometry_test_utils.cc |
index bed04c4bf0fbf298af668a4bdd35e44b35ce7f8e..8182bb17ddd6d3d8422047516c87318209e4f99b 100644 |
--- a/cc/test/geometry_test_utils.cc |
+++ b/cc/test/geometry_test_utils.cc |
@@ -4,6 +4,7 @@ |
#include "cc/test/geometry_test_utils.h" |
+#include "base/logging.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "third_party/WebKit/Source/Platform/chromium/public/WebTransformationMatrix.h" |
#include "ui/gfx/transform.h" |
@@ -56,4 +57,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
2013/01/04 21:56:07
SkipInitialization?
|
+ bool invertedSuccessfully = transform.GetInverse(&result); |
+ DCHECK(invertedSuccessfully); |
+ return result; |
+} |
+ |
} // namespace cc |