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 <memory> |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/StringOrUnrestrictedDoubleSequence.h" | 10 #include "bindings/core/v8/StringOrUnrestrictedDoubleSequence.h" |
11 #include "core/dom/ArrayBufferViewHelpers.h" | 11 #include "core/dom/ArrayBufferViewHelpers.h" |
12 #include "core/dom/DOMTypedArray.h" | 12 #include "core/dom/DOMTypedArray.h" |
13 #include "platform/bindings/ScriptWrappable.h" | 13 #include "platform/bindings/ScriptWrappable.h" |
14 #include "platform/heap/Handle.h" | 14 #include "platform/heap/Handle.h" |
15 #include "platform/transforms/TransformationMatrix.h" | 15 #include "platform/transforms/TransformationMatrix.h" |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class DOMMatrix; | 19 class DOMMatrix; |
20 class DOMMatrixInit; | 20 class DOMMatrixInit; |
21 class DOMPoint; | 21 class DOMPoint; |
22 class DOMPointInit; | 22 class DOMPointInit; |
23 | 23 |
24 class CORE_EXPORT DOMMatrixReadOnly | 24 class CORE_EXPORT DOMMatrixReadOnly |
25 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, | 25 : public GarbageCollectedFinalized<DOMMatrixReadOnly>, |
26 public ScriptWrappable { | 26 public ScriptWrappable { |
27 DEFINE_WRAPPERTYPEINFO(); | 27 DEFINE_WRAPPERTYPEINFO(); |
28 | 28 |
29 public: | 29 public: |
30 static DOMMatrixReadOnly* Create(ExceptionState&); | 30 static DOMMatrixReadOnly* Create(ExecutionContext*, ExceptionState&); |
31 static DOMMatrixReadOnly* Create(StringOrUnrestrictedDoubleSequence&, | 31 static DOMMatrixReadOnly* Create(ExecutionContext*, |
| 32 StringOrUnrestrictedDoubleSequence&, |
32 ExceptionState&); | 33 ExceptionState&); |
33 static DOMMatrixReadOnly* fromFloat32Array(NotShared<DOMFloat32Array>, | 34 static DOMMatrixReadOnly* fromFloat32Array(NotShared<DOMFloat32Array>, |
34 ExceptionState&); | 35 ExceptionState&); |
35 static DOMMatrixReadOnly* fromFloat64Array(NotShared<DOMFloat64Array>, | 36 static DOMMatrixReadOnly* fromFloat64Array(NotShared<DOMFloat64Array>, |
36 ExceptionState&); | 37 ExceptionState&); |
37 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); | 38 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); |
38 virtual ~DOMMatrixReadOnly(); | 39 virtual ~DOMMatrixReadOnly(); |
39 | 40 |
40 double a() const { return matrix_->M11(); } | 41 double a() const { return matrix_->M11(); } |
41 double b() const { return matrix_->M12(); } | 42 double b() const { return matrix_->M12(); } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // 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 |
136 // to allocate TransformationMatrix on PartitionAlloc. | 137 // to allocate TransformationMatrix on PartitionAlloc. |
137 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 138 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
138 std::unique_ptr<TransformationMatrix> matrix_; | 139 std::unique_ptr<TransformationMatrix> matrix_; |
139 bool is2d_; | 140 bool is2d_; |
140 }; | 141 }; |
141 | 142 |
142 } // namespace blink | 143 } // namespace blink |
143 | 144 |
144 #endif | 145 #endif |
OLD | NEW |