OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DOMMatrixReadOnly_h | 5 #ifndef DOMMatrixReadOnly_h |
6 #define DOMMatrixReadOnly_h | 6 #define DOMMatrixReadOnly_h |
7 | 7 |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "core/dom/DOMTypedArray.h" | 10 #include "core/dom/DOMTypedArray.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 DOMMatrix* multiply(DOMMatrix*); | 52 DOMMatrix* multiply(DOMMatrix*); |
53 DOMMatrix* translate(double tx, double ty, double tz = 0); | 53 DOMMatrix* translate(double tx, double ty, double tz = 0); |
54 DOMMatrix* scale(double scale, double ox = 0, double oy = 0); | 54 DOMMatrix* scale(double scale, double ox = 0, double oy = 0); |
55 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0
); | 55 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0
); |
56 DOMMatrix* scaleNonUniform(double sx, double sy = 1, double sz = 1, | 56 DOMMatrix* scaleNonUniform(double sx, double sy = 1, double sz = 1, |
57 double ox = 0, double oy = 0, double oz = 0); | 57 double ox = 0, double oy = 0, double oz = 0); |
58 DOMMatrix* skewX(double sx); | 58 DOMMatrix* skewX(double sx); |
59 DOMMatrix* skewY(double sy); | 59 DOMMatrix* skewY(double sy); |
60 DOMMatrix* flipX(); | 60 DOMMatrix* flipX(); |
61 DOMMatrix* flipY(); | 61 DOMMatrix* flipY(); |
| 62 DOMMatrix* inverse(); |
62 | 63 |
63 DOMFloat32Array* toFloat32Array() const; | 64 DOMFloat32Array* toFloat32Array() const; |
64 DOMFloat64Array* toFloat64Array() const; | 65 DOMFloat64Array* toFloat64Array() const; |
65 | 66 |
66 const String toString() const; | 67 const String toString() const; |
67 | 68 |
68 const TransformationMatrix& matrix() const { return *m_matrix; } | 69 const TransformationMatrix& matrix() const { return *m_matrix; } |
69 | 70 |
70 DEFINE_INLINE_TRACE() { } | 71 DEFINE_INLINE_TRACE() { } |
71 | 72 |
72 protected: | 73 protected: |
73 DOMMatrixReadOnly() {} | 74 DOMMatrixReadOnly() {} |
74 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc | 75 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc |
75 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr | 76 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr |
76 // to allocate TransformationMatrix on PartitionAlloc. | 77 // to allocate TransformationMatrix on PartitionAlloc. |
77 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 78 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
78 std::unique_ptr<TransformationMatrix> m_matrix; | 79 std::unique_ptr<TransformationMatrix> m_matrix; |
79 bool m_is2D; | 80 bool m_is2D; |
80 | 81 |
81 private: | 82 private: |
82 DOMMatrixReadOnly(Vector<double> sequence); | 83 DOMMatrixReadOnly(Vector<double> sequence); |
83 }; | 84 }; |
84 | 85 |
85 } // namespace blink | 86 } // namespace blink |
86 | 87 |
87 #endif | 88 #endif |
OLD | NEW |