| 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 <memory> |
| 8 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 10 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "core/dom/DOMTypedArray.h" | 11 #include "core/dom/DOMTypedArray.h" |
| 12 #include "core/dom/MaybeShared.h" |
| 11 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 12 #include "platform/transforms/TransformationMatrix.h" | 14 #include "platform/transforms/TransformationMatrix.h" |
| 13 #include <memory> | |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 class DOMMatrix; | 18 class DOMMatrix; |
| 18 class DOMMatrixInit; | 19 class DOMMatrixInit; |
| 19 class DOMPoint; | 20 class DOMPoint; |
| 20 class DOMPointInit; | 21 class DOMPointInit; |
| 21 | 22 |
| 22 class CORE_EXPORT DOMMatrixReadOnly | 23 class CORE_EXPORT DOMMatrixReadOnly |
| 23 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, | 24 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, |
| 24 public ScriptWrappable { | 25 public ScriptWrappable { |
| 25 DEFINE_WRAPPERTYPEINFO(); | 26 DEFINE_WRAPPERTYPEINFO(); |
| 26 | 27 |
| 27 public: | 28 public: |
| 28 static DOMMatrixReadOnly* create(ExceptionState&); | 29 static DOMMatrixReadOnly* create(ExceptionState&); |
| 29 static DOMMatrixReadOnly* create(const String&, ExceptionState&); | 30 static DOMMatrixReadOnly* create(const String&, ExceptionState&); |
| 30 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&); | 31 static DOMMatrixReadOnly* create(Vector<double>, ExceptionState&); |
| 31 static DOMMatrixReadOnly* fromFloat32Array(DOMFloat32Array*, ExceptionState&); | 32 static DOMMatrixReadOnly* fromFloat32Array( |
| 32 static DOMMatrixReadOnly* fromFloat64Array(DOMFloat64Array*, ExceptionState&); | 33 const MaybeShared<DOMFloat32Array>&, |
| 34 ExceptionState&); |
| 35 static DOMMatrixReadOnly* fromFloat64Array( |
| 36 const MaybeShared<DOMFloat64Array>&, |
| 37 ExceptionState&); |
| 33 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); | 38 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); |
| 34 virtual ~DOMMatrixReadOnly(); | 39 virtual ~DOMMatrixReadOnly(); |
| 35 | 40 |
| 36 double a() const { return m_matrix->m11(); } | 41 double a() const { return m_matrix->m11(); } |
| 37 double b() const { return m_matrix->m12(); } | 42 double b() const { return m_matrix->m12(); } |
| 38 double c() const { return m_matrix->m21(); } | 43 double c() const { return m_matrix->m21(); } |
| 39 double d() const { return m_matrix->m22(); } | 44 double d() const { return m_matrix->m22(); } |
| 40 double e() const { return m_matrix->m41(); } | 45 double e() const { return m_matrix->m41(); } |
| 41 double f() const { return m_matrix->m42(); } | 46 double f() const { return m_matrix->m42(); } |
| 42 | 47 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr | 136 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr |
| 132 // to allocate TransformationMatrix on PartitionAlloc. | 137 // to allocate TransformationMatrix on PartitionAlloc. |
| 133 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 138 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
| 134 std::unique_ptr<TransformationMatrix> m_matrix; | 139 std::unique_ptr<TransformationMatrix> m_matrix; |
| 135 bool m_is2D; | 140 bool m_is2D; |
| 136 }; | 141 }; |
| 137 | 142 |
| 138 } // namespace blink | 143 } // namespace blink |
| 139 | 144 |
| 140 #endif | 145 #endif |
| OLD | NEW |