| 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/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 Loading... |
| 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* rotate(double rotX); |
| 59 DOMMatrix* rotate(double rotX, double rotY); |
| 60 DOMMatrix* rotate(double rotX, double rotY, double rotZ); |
| 61 DOMMatrix* rotateFromVector(double x, double y); |
| 62 DOMMatrix* rotateAxisAngle(double x, double y, double z, double angle); |
| 58 DOMMatrix* flipX(); | 63 DOMMatrix* flipX(); |
| 59 DOMMatrix* flipY(); | 64 DOMMatrix* flipY(); |
| 60 | 65 |
| 61 DOMFloat32Array* toFloat32Array() const; | 66 DOMFloat32Array* toFloat32Array() const; |
| 62 DOMFloat64Array* toFloat64Array() const; | 67 DOMFloat64Array* toFloat64Array() const; |
| 63 | 68 |
| 64 const TransformationMatrix& matrix() const { return *m_matrix; } | 69 const TransformationMatrix& matrix() const { return *m_matrix; } |
| 65 | 70 |
| 66 DEFINE_INLINE_TRACE() { } | 71 DEFINE_INLINE_TRACE() { } |
| 67 | 72 |
| 68 protected: | 73 protected: |
| 69 DOMMatrixReadOnly() {} | 74 DOMMatrixReadOnly() {} |
| 70 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc | 75 // TransformationMatrix needs to be 16-byte aligned. PartitionAlloc |
| 71 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr | 76 // supports 16-byte alignment but Oilpan doesn't. So we use an std::unique_p
tr |
| 72 // to allocate TransformationMatrix on PartitionAlloc. | 77 // to allocate TransformationMatrix on PartitionAlloc. |
| 73 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. | 78 // TODO(oilpan): Oilpan should support 16-byte aligned allocations. |
| 74 std::unique_ptr<TransformationMatrix> m_matrix; | 79 std::unique_ptr<TransformationMatrix> m_matrix; |
| 75 bool m_is2D; | 80 bool m_is2D; |
| 76 | 81 |
| 77 private: | 82 private: |
| 78 DOMMatrixReadOnly(Vector<double> sequence); | 83 DOMMatrixReadOnly(Vector<double> sequence); |
| 79 }; | 84 }; |
| 80 | 85 |
| 81 } // namespace blink | 86 } // namespace blink |
| 82 | 87 |
| 83 #endif | 88 #endif |
| OLD | NEW |