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