| 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" |
| 11 #include "platform/transforms/TransformationMatrix.h" | 11 #include "platform/transforms/TransformationMatrix.h" |
| 12 #include <memory> |
| 12 | 13 |
| 13 namespace blink { | 14 namespace blink { |
| 14 | 15 |
| 15 class DOMMatrix; | 16 class DOMMatrix; |
| 16 | 17 |
| 17 class DOMMatrixReadOnly : public GarbageCollectedFinalized<DOMMatrixReadOnly>, p
ublic ScriptWrappable { | 18 class DOMMatrixReadOnly : public GarbageCollectedFinalized<DOMMatrixReadOnly>, p
ublic ScriptWrappable { |
| 18 DEFINE_WRAPPERTYPEINFO(); | 19 DEFINE_WRAPPERTYPEINFO(); |
| 19 public: | 20 public: |
| 20 virtual ~DOMMatrixReadOnly(); | 21 virtual ~DOMMatrixReadOnly(); |
| 21 | 22 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 56 |
| 56 DOMFloat32Array* toFloat32Array() const; | 57 DOMFloat32Array* toFloat32Array() const; |
| 57 DOMFloat64Array* toFloat64Array() const; | 58 DOMFloat64Array* toFloat64Array() const; |
| 58 | 59 |
| 59 const TransformationMatrix& matrix() const { return *m_matrix; } | 60 const TransformationMatrix& matrix() const { return *m_matrix; } |
| 60 | 61 |
| 61 DEFINE_INLINE_TRACE() { } | 62 DEFINE_INLINE_TRACE() { } |
| 62 | 63 |
| 63 protected: | 64 protected: |
| 64 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc | 65 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc |
| 65 // supports 16-byte alignment but Oilpan doesn't. So we use an OwnPtr | 66 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr |
| 66 // to allocate TransformationMatrix on PartitionAlloc. | 67 // to allocate TransformationMatrix on PartitionAlloc. |
| 67 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 68 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
| 68 OwnPtr<TransformationMatrix> m_matrix; | 69 std::unique_ptr<TransformationMatrix> m_matrix; |
| 69 bool m_is2D; | 70 bool m_is2D; |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace blink | 73 } // namespace blink |
| 73 | 74 |
| 74 #endif | 75 #endif |
| OLD | NEW |