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

Unified Diff: third_party/WebKit/Source/platform/transforms/TransformationMatrix.h

Issue 1673093003: blink::TransformationMatrix implement create methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change adoptPtr -> create for missed class Created 4 years, 10 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 | « third_party/WebKit/Source/platform/geometry/TransformState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/transforms/TransformationMatrix.h
diff --git a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h
index f11d193a62e897132eb6269c26ef3f06a19cad78..ae39dad8a19608cace998cd4685700dec4ea0361 100644
--- a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h
+++ b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.h
@@ -33,6 +33,7 @@
#include "wtf/Alignment.h"
#include "wtf/Allocator.h"
#include "wtf/CPU.h"
+#include "wtf/PassOwnPtr.h"
#include <string.h> // for memcpy
namespace blink {
@@ -60,6 +61,30 @@ public:
typedef double Matrix4[4][4];
#endif
+ static PassOwnPtr<TransformationMatrix> create()
+ {
+ return adoptPtr(new TransformationMatrix());
+ }
+ static PassOwnPtr<TransformationMatrix> create(const AffineTransform& t)
+ {
+ return adoptPtr(new TransformationMatrix(t));
+ }
+ static PassOwnPtr<TransformationMatrix> create(const TransformationMatrix& t)
+ {
+ return adoptPtr(new TransformationMatrix(t));
+ }
+ static PassOwnPtr<TransformationMatrix> create(double a, double b, double c, double d, double e, double f)
+ {
+ return adoptPtr(new TransformationMatrix(a, b, c, d, e, f));
+ }
+ static PassOwnPtr<TransformationMatrix> create(double m11, double m12, double m13, double m14,
+ double m21, double m22, double m23, double m24,
+ double m31, double m32, double m33, double m34,
+ double m41, double m42, double m43, double m44)
+ {
+ return adoptPtr(new TransformationMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44));
+ }
alancutter (OOO until 2018) 2016/02/08 04:29:52 Are all these needed? Can we omit any that aren't
tridgell 2016/02/08 05:30:54 Done. Removed. The only unused one was create(co
+
TransformationMatrix()
{
checkAlignment();
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/TransformState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698