| 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" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 #include "platform/transforms/TransformationMatrix.h" | 12 #include "platform/transforms/TransformationMatrix.h" |
| 13 #include <memory> | 13 #include <memory> |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class DOMMatrix; | 17 class DOMMatrix; |
| 18 class DOMMatrixInit; | 18 class DOMMatrixInit; |
| 19 class DOMPoint; |
| 20 class DOMPointInit; |
| 19 | 21 |
| 20 class CORE_EXPORT DOMMatrixReadOnly | 22 class CORE_EXPORT DOMMatrixReadOnly |
| 21 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, | 23 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, |
| 22 public ScriptWrappable { | 24 public ScriptWrappable { |
| 23 DEFINE_WRAPPERTYPEINFO(); | 25 DEFINE_WRAPPERTYPEINFO(); |
| 24 | 26 |
| 25 public: | 27 public: |
| 26 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&); | 28 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&); |
| 27 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&); | 29 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&); |
| 28 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&); | 30 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 DOMMatrix* rotateAxisAngle(double x = 0, | 71 DOMMatrix* rotateAxisAngle(double x = 0, |
| 70 double y = 0, | 72 double y = 0, |
| 71 double z = 0, | 73 double z = 0, |
| 72 double angle = 0); | 74 double angle = 0); |
| 73 DOMMatrix* skewX(double sx); | 75 DOMMatrix* skewX(double sx); |
| 74 DOMMatrix* skewY(double sy); | 76 DOMMatrix* skewY(double sy); |
| 75 DOMMatrix* flipX(); | 77 DOMMatrix* flipX(); |
| 76 DOMMatrix* flipY(); | 78 DOMMatrix* flipY(); |
| 77 DOMMatrix* inverse(); | 79 DOMMatrix* inverse(); |
| 78 | 80 |
| 81 DOMPoint* transformPoint(const DOMPointInit&); |
| 82 |
| 79 DOMFloat32Array* toFloat32Array() const; | 83 DOMFloat32Array* toFloat32Array() const; |
| 80 DOMFloat64Array* toFloat64Array() const; | 84 DOMFloat64Array* toFloat64Array() const; |
| 81 | 85 |
| 82 const String toString() const; | 86 const String toString() const; |
| 83 | 87 |
| 84 const TransformationMatrix& matrix() const { return *m_matrix; } | 88 const TransformationMatrix& matrix() const { return *m_matrix; } |
| 85 | 89 |
| 86 DEFINE_INLINE_TRACE() {} | 90 DEFINE_INLINE_TRACE() {} |
| 87 | 91 |
| 88 protected: | 92 protected: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 112 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr | 116 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr |
| 113 // to allocate TransformationMatrix on PartitionAlloc. | 117 // to allocate TransformationMatrix on PartitionAlloc. |
| 114 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 118 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
| 115 std::unique_ptr<TransformationMatrix> m_matrix; | 119 std::unique_ptr<TransformationMatrix> m_matrix; |
| 116 bool m_is2D; | 120 bool m_is2D; |
| 117 }; | 121 }; |
| 118 | 122 |
| 119 } // namespace blink | 123 } // namespace blink |
| 120 | 124 |
| 121 #endif | 125 #endif |
| OLD | NEW |