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" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 public: | 29 public: |
30 static DOMMatrixReadOnly* Create(ExceptionState&); | 30 static DOMMatrixReadOnly* Create(ExceptionState&); |
31 static DOMMatrixReadOnly* Create(StringOrUnrestrictedDoubleSequence&, | 31 static DOMMatrixReadOnly* Create(StringOrUnrestrictedDoubleSequence&, |
32 ExceptionState&); | 32 ExceptionState&); |
33 static DOMMatrixReadOnly* fromFloat32Array(NotShared<DOMFloat32Array>, | 33 static DOMMatrixReadOnly* fromFloat32Array(NotShared<DOMFloat32Array>, |
34 ExceptionState&); | 34 ExceptionState&); |
35 static DOMMatrixReadOnly* fromFloat64Array(NotShared<DOMFloat64Array>, | 35 static DOMMatrixReadOnly* fromFloat64Array(NotShared<DOMFloat64Array>, |
36 ExceptionState&); | 36 ExceptionState&); |
37 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); | 37 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); |
| 38 static DOMMatrixReadOnly* fromMatrixForSerialization(DOMMatrixInit&); |
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(); } |
42 double c() const { return matrix_->M21(); } | 43 double c() const { return matrix_->M21(); } |
43 double d() const { return matrix_->M22(); } | 44 double d() const { return matrix_->M22(); } |
44 double e() const { return matrix_->M41(); } | 45 double e() const { return matrix_->M41(); } |
45 double f() const { return matrix_->M42(); } | 46 double f() const { return matrix_->M42(); } |
46 | 47 |
47 double m11() const { return matrix_->M11(); } | 48 double m11() const { return matrix_->M11(); } |
(...skipping 87 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 |