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

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

Issue 2260393002: add FlipX() and FlipY() funtion in DOMMatrixReadOnly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add FlipX() and FlipY() funtion in DOMMatrixReadOnly. Created 4 years, 4 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 "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "core/dom/DOMTypedArray.h" 10 #include "core/dom/DOMTypedArray.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 bool is2D() const; 49 bool is2D() const;
50 bool isIdentity() const; 50 bool isIdentity() const;
51 51
52 DOMMatrix* multiply(DOMMatrix*); 52 DOMMatrix* multiply(DOMMatrix*);
53 DOMMatrix* translate(double tx, double ty, double tz = 0); 53 DOMMatrix* translate(double tx, double ty, double tz = 0);
54 DOMMatrix* scale(double scale, double ox = 0, double oy = 0); 54 DOMMatrix* scale(double scale, double ox = 0, double oy = 0);
55 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0 ); 55 DOMMatrix* scale3d(double scale, double ox = 0, double oy = 0, double oz = 0 );
56 DOMMatrix* scaleNonUniform(double sx, double sy = 1, double sz = 1, 56 DOMMatrix* scaleNonUniform(double sx, double sy = 1, double sz = 1,
57 double ox = 0, double oy = 0, double oz = 0); 57 double ox = 0, double oy = 0, double oz = 0);
58 DOMMatrix* flipX();
59 DOMMatrix* flipY();
58 60
59 DOMFloat32Array* toFloat32Array() const; 61 DOMFloat32Array* toFloat32Array() const;
60 DOMFloat64Array* toFloat64Array() const; 62 DOMFloat64Array* toFloat64Array() const;
61 63
62 const TransformationMatrix& matrix() const { return *m_matrix; } 64 const TransformationMatrix& matrix() const { return *m_matrix; }
63 65
64 DEFINE_INLINE_TRACE() { } 66 DEFINE_INLINE_TRACE() { }
65 67
66 protected: 68 protected:
67 DOMMatrixReadOnly() {} 69 DOMMatrixReadOnly() {}
68 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc 70 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc
69 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p tr 71 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p tr
70 // to allocate TransformationMatrix on PartitionAlloc. 72 // to allocate TransformationMatrix on PartitionAlloc.
71 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. 73 // TODO(oilpan): Oilpan should support 16-byte aligned allocations.
72 std::unique_ptr<TransformationMatrix> m_matrix; 74 std::unique_ptr<TransformationMatrix> m_matrix;
73 bool m_is2D; 75 bool m_is2D;
74 76
75 private: 77 private:
76 DOMMatrixReadOnly(Vector<double> sequence); 78 DOMMatrixReadOnly(Vector<double> sequence);
77 }; 79 };
78 80
79 } // namespace blink 81 } // namespace blink
80 82
81 #endif 83 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698