Migrate from MathUtil::inverse() to gfx::Transform::GetInverse()
BUG=159972, 163769
Review URL: https://codereview.chromium.org/11644008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175363 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index 6cd10b1..95de30f 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -22,7 +22,17 @@
// copy/assign.
class UI_EXPORT Transform {
public:
+
+ enum SkipInitialization {
+ kSkipInitialization
+ };
+
Transform() : matrix_(SkMatrix44::kIdentity_Constructor) {}
+
+ // Skips initializing this matrix to avoid overhead, when we know it will be
+ // initialized before use.
+ Transform(SkipInitialization)
+ : matrix_(SkMatrix44::kUninitialized_Constructor) {}
Transform(const Transform& rhs) : matrix_(rhs.matrix_) {}
// Initialize with the concatenation of lhs * rhs.
Transform(const Transform& lhs, const Transform& rhs)