| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CSSMatrix_h | 26 #ifndef CSSMatrix_h |
| 27 #define CSSMatrix_h | 27 #define CSSMatrix_h |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
| 30 #include "platform/transforms/TransformationMatrix.h" | 30 #include "platform/transforms/TransformationMatrix.h" |
| 31 #include "wtf/text/WTFString.h" | 31 #include "wtf/text/WTFString.h" |
| 32 #include <memory> |
| 32 | 33 |
| 33 namespace blink { | 34 namespace blink { |
| 34 | 35 |
| 35 class ExceptionState; | 36 class ExceptionState; |
| 36 class ExecutionContext; | 37 class ExecutionContext; |
| 37 | 38 |
| 38 class CSSMatrix final : public GarbageCollectedFinalized<CSSMatrix>, public Scri
ptWrappable { | 39 class CSSMatrix final : public GarbageCollectedFinalized<CSSMatrix>, public Scri
ptWrappable { |
| 39 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
| 40 public: | 41 public: |
| 41 static CSSMatrix* create(const TransformationMatrix& m) | 42 static CSSMatrix* create(const TransformationMatrix& m) |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 146 |
| 146 String toString() const; | 147 String toString() const; |
| 147 | 148 |
| 148 DEFINE_INLINE_TRACE() { } | 149 DEFINE_INLINE_TRACE() { } |
| 149 | 150 |
| 150 protected: | 151 protected: |
| 151 CSSMatrix(const TransformationMatrix&); | 152 CSSMatrix(const TransformationMatrix&); |
| 152 CSSMatrix(const String&, ExceptionState&); | 153 CSSMatrix(const String&, ExceptionState&); |
| 153 | 154 |
| 154 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc | 155 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc |
| 155 // supports 16-byte alignment but Oilpan doesn't. So we use an OwnPtr | 156 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr |
| 156 // to allocate TransformationMatrix on PartitionAlloc. | 157 // to allocate TransformationMatrix on PartitionAlloc. |
| 157 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 158 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
| 158 OwnPtr<TransformationMatrix> m_matrix; | 159 std::unique_ptr<TransformationMatrix> m_matrix; |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 } // namespace blink | 162 } // namespace blink |
| 162 | 163 |
| 163 #endif // CSSMatrix_h | 164 #endif // CSSMatrix_h |
| OLD | NEW |