Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.h

Issue 2874203003: Implement serialization/deserialization of geometry interfaces (Closed)
Patch Set: x Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 public: 29 public:
30 static DOMMatrixReadOnly* Create(ExecutionContext*, ExceptionState&); 30 static DOMMatrixReadOnly* Create(ExecutionContext*, ExceptionState&);
31 static DOMMatrixReadOnly* Create(ExecutionContext*, 31 static DOMMatrixReadOnly* Create(ExecutionContext*,
32 StringOrUnrestrictedDoubleSequence&, 32 StringOrUnrestrictedDoubleSequence&,
33 ExceptionState&); 33 ExceptionState&);
34 static DOMMatrixReadOnly* fromFloat32Array(NotShared<DOMFloat32Array>, 34 static DOMMatrixReadOnly* fromFloat32Array(NotShared<DOMFloat32Array>,
35 ExceptionState&); 35 ExceptionState&);
36 static DOMMatrixReadOnly* fromFloat64Array(NotShared<DOMFloat64Array>, 36 static DOMMatrixReadOnly* fromFloat64Array(NotShared<DOMFloat64Array>,
37 ExceptionState&); 37 ExceptionState&);
38 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&); 38 static DOMMatrixReadOnly* fromMatrix(DOMMatrixInit&, ExceptionState&);
39 static DOMMatrixReadOnly* CreateForSerialization(double[], int size);
39 virtual ~DOMMatrixReadOnly(); 40 virtual ~DOMMatrixReadOnly();
40 41
41 double a() const { return matrix_->M11(); } 42 double a() const { return matrix_->M11(); }
42 double b() const { return matrix_->M12(); } 43 double b() const { return matrix_->M12(); }
43 double c() const { return matrix_->M21(); } 44 double c() const { return matrix_->M21(); }
44 double d() const { return matrix_->M22(); } 45 double d() const { return matrix_->M22(); }
45 double e() const { return matrix_->M41(); } 46 double e() const { return matrix_->M41(); }
46 double f() const { return matrix_->M42(); } 47 double f() const { return matrix_->M42(); }
47 48
48 double m11() const { return matrix_->M11(); } 49 double m11() const { return matrix_->M11(); }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr 137 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_ptr
137 // to allocate TransformationMatrix on PartitionAlloc. 138 // to allocate TransformationMatrix on PartitionAlloc.
138 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. 139 // TODO(oilpan): Oilpan should support 16-byte aligned allocations.
139 std::unique_ptr<TransformationMatrix> matrix_; 140 std::unique_ptr<TransformationMatrix> matrix_;
140 bool is2d_; 141 bool is2d_;
141 }; 142 };
142 143
143 } // namespace blink 144 } // namespace blink
144 145
145 #endif 146 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/geometry/DOMMatrix.cpp ('k') | third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698