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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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* flipX(); | 58 DOMMatrix* flipX(); |
59 DOMMatrix* flipY(); | 59 DOMMatrix* flipY(); |
60 | 60 |
61 DOMFloat32Array* toFloat32Array() const; | 61 DOMFloat32Array* toFloat32Array() const; |
62 DOMFloat64Array* toFloat64Array() const; | 62 DOMFloat64Array* toFloat64Array() const; |
63 | 63 |
| 64 const String toString() const; |
| 65 |
64 const TransformationMatrix& matrix() const { return *m_matrix; } | 66 const TransformationMatrix& matrix() const { return *m_matrix; } |
65 | 67 |
66 DEFINE_INLINE_TRACE() { } | 68 DEFINE_INLINE_TRACE() { } |
67 | 69 |
68 protected: | 70 protected: |
69 DOMMatrixReadOnly() {} | 71 DOMMatrixReadOnly() {} |
70 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc | 72 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc |
71 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr | 73 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr |
72 // to allocate TransformationMatrix on PartitionAlloc. | 74 // to allocate TransformationMatrix on PartitionAlloc. |
73 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 75 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
74 std::unique_ptr<TransformationMatrix> m_matrix; | 76 std::unique_ptr<TransformationMatrix> m_matrix; |
75 bool m_is2D; | 77 bool m_is2D; |
76 | 78 |
77 private: | 79 private: |
78 DOMMatrixReadOnly(Vector<double> sequence); | 80 DOMMatrixReadOnly(Vector<double> sequence); |
79 }; | 81 }; |
80 | 82 |
81 } // namespace blink | 83 } // namespace blink |
82 | 84 |
83 #endif | 85 #endif |
OLD | NEW |