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/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "core/dom/DOMTypedArray.h" | 9 #include "core/dom/DOMTypedArray.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 bool is2D() const; | 46 bool is2D() const; |
47 bool isIdentity() const; | 47 bool isIdentity() const; |
48 | 48 |
49 DOMMatrix* multiply(DOMMatrix*); | 49 DOMMatrix* multiply(DOMMatrix*); |
50 DOMMatrix* translate(double tx, double ty, double tz = 0); | 50 DOMMatrix* translate(double tx, double ty, double tz = 0); |
51 DOMMatrix* scale(double scale, double ox = 0, double oy = 0); | 51 DOMMatrix* scale(double scale, double ox = 0, double oy = 0); |
52 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0
); | 52 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0
); |
53 DOMMatrix* scaleNonUniform(double sx, double sy = 1, double sz = 1, | 53 DOMMatrix* scaleNonUniform(double sx, double sy = 1, double sz = 1, |
54 double ox = 0, double oy = 0, double oz = 0); | 54 double ox = 0, double oy = 0, double oz = 0); |
55 | 55 |
56 PassRefPtr<DOMFloat32Array> toFloat32Array() const; | 56 DOMFloat32Array* toFloat32Array() const; |
57 PassRefPtr<DOMFloat64Array> toFloat64Array() const; | 57 DOMFloat64Array* toFloat64Array() const; |
58 | 58 |
59 const TransformationMatrix& matrix() const { return *m_matrix; } | 59 const TransformationMatrix& matrix() const { return *m_matrix; } |
60 | 60 |
61 DEFINE_INLINE_TRACE() { } | 61 DEFINE_INLINE_TRACE() { } |
62 | 62 |
63 protected: | 63 protected: |
64 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc | 64 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc |
65 // supports 16-byte alignment but Oilpan doesn't. So we use an OwnPtr | 65 // supports 16-byte alignment but Oilpan doesn't. So we use an OwnPtr |
66 // to allocate TransformationMatrix on PartitionAlloc. | 66 // to allocate TransformationMatrix on PartitionAlloc. |
67 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 67 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
68 OwnPtr<TransformationMatrix> m_matrix; | 68 OwnPtr<TransformationMatrix> m_matrix; |
69 bool m_is2D; | 69 bool m_is2D; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace blink | 72 } // namespace blink |
73 | 73 |
74 #endif | 74 #endif |
OLD | NEW |