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) |