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

Unified Diff: ui/gfx/transform.h

Issue 11644008: Migrate from MathUtil::inverse() to gfx::Transform::GetInverse() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved uninvertible matrix identity-initialization into gfx::Transform 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
Index: ui/gfx/transform.h
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index 6cd10b13f3fcad93ddfac117cdd8a2340f342d38..95de30fa3f4c0d3275c19cd61c3e4663f232c38f 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -22,7 +22,17 @@ class Vector3dF;
// 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)

Powered by Google App Engine
This is Rietveld 408576698