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

Unified Diff: cc/test/geometry_test_utils.cc

Issue 11644008: Migrate from MathUtil::inverse() to gfx::Transform::GetInverse() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/geometry_test_utils.h ('k') | ui/gfx/transform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..385dbaca262aab9ceccf437516e6021f93754ae0 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(gfx::Transform::kSkipInitialization);
+ bool invertedSuccessfully = transform.GetInverse(&result);
+ DCHECK(invertedSuccessfully);
+ return result;
+}
+
} // namespace cc
« no previous file with comments | « cc/test/geometry_test_utils.h ('k') | ui/gfx/transform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698