OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 USING_FAST_MALLOC(TransformationMatrix); | 57 USING_FAST_MALLOC(TransformationMatrix); |
58 | 58 |
59 public: | 59 public: |
60 #if defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) | 60 #if defined(TRANSFORMATION_MATRIX_USE_X86_64_SSE2) |
61 typedef WTF_ALIGNED(double, Matrix4[4][4], 16); | 61 typedef WTF_ALIGNED(double, Matrix4[4][4], 16); |
62 #else | 62 #else |
63 typedef double Matrix4[4][4]; | 63 typedef double Matrix4[4][4]; |
64 #endif | 64 #endif |
65 | 65 |
66 static std::unique_ptr<TransformationMatrix> create() { | 66 static std::unique_ptr<TransformationMatrix> create() { |
67 return makeUnique<TransformationMatrix>(); | 67 return WTF::makeUnique<TransformationMatrix>(); |
68 } | 68 } |
69 static std::unique_ptr<TransformationMatrix> create( | 69 static std::unique_ptr<TransformationMatrix> create( |
70 const TransformationMatrix& t) { | 70 const TransformationMatrix& t) { |
71 return makeUnique<TransformationMatrix>(t); | 71 return WTF::makeUnique<TransformationMatrix>(t); |
72 } | 72 } |
73 static std::unique_ptr<TransformationMatrix> create(double a, | 73 static std::unique_ptr<TransformationMatrix> create(double a, |
74 double b, | 74 double b, |
75 double c, | 75 double c, |
76 double d, | 76 double d, |
77 double e, | 77 double e, |
78 double f) { | 78 double f) { |
79 return makeUnique<TransformationMatrix>(a, b, c, d, e, f); | 79 return WTF::makeUnique<TransformationMatrix>(a, b, c, d, e, f); |
80 } | 80 } |
81 static std::unique_ptr<TransformationMatrix> create(double m11, | 81 static std::unique_ptr<TransformationMatrix> create(double m11, |
82 double m12, | 82 double m12, |
83 double m13, | 83 double m13, |
84 double m14, | 84 double m14, |
85 double m21, | 85 double m21, |
86 double m22, | 86 double m22, |
87 double m23, | 87 double m23, |
88 double m24, | 88 double m24, |
89 double m31, | 89 double m31, |
90 double m32, | 90 double m32, |
91 double m33, | 91 double m33, |
92 double m34, | 92 double m34, |
93 double m41, | 93 double m41, |
94 double m42, | 94 double m42, |
95 double m43, | 95 double m43, |
96 double m44) { | 96 double m44) { |
97 return wrapUnique(new TransformationMatrix(m11, m12, m13, m14, m21, m22, | 97 return WTF::wrapUnique( |
98 m23, m24, m31, m32, m33, m34, | 98 new TransformationMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, |
99 m41, m42, m43, m44)); | 99 m32, m33, m34, m41, m42, m43, m44)); |
100 } | 100 } |
101 | 101 |
102 TransformationMatrix() { | 102 TransformationMatrix() { |
103 checkAlignment(); | 103 checkAlignment(); |
104 makeIdentity(); | 104 makeIdentity(); |
105 } | 105 } |
106 TransformationMatrix(const AffineTransform&); | 106 TransformationMatrix(const AffineTransform&); |
107 TransformationMatrix(const TransformationMatrix& t) { | 107 TransformationMatrix(const TransformationMatrix& t) { |
108 checkAlignment(); | 108 checkAlignment(); |
109 *this = t; | 109 *this = t; |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 Matrix4 m_matrix; | 490 Matrix4 m_matrix; |
491 }; | 491 }; |
492 | 492 |
493 // Redeclared here to avoid ODR issues. | 493 // Redeclared here to avoid ODR issues. |
494 // See platform/testing/TransformPrinters.h. | 494 // See platform/testing/TransformPrinters.h. |
495 void PrintTo(const TransformationMatrix&, std::ostream*); | 495 void PrintTo(const TransformationMatrix&, std::ostream*); |
496 | 496 |
497 } // namespace blink | 497 } // namespace blink |
498 | 498 |
499 #endif // TransformationMatrix_h | 499 #endif // TransformationMatrix_h |
OLD | NEW |