| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef TransformPaintPropertyNode_h |
| 6 #define TransformPaintPropertyNode_h |
| 7 |
| 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/FloatPoint3D.h" |
| 10 #include "platform/transforms/TransformationMatrix.h" |
| 11 #include "wtf/PassRefPtr.h" |
| 12 #include "wtf/RefCounted.h" |
| 13 #include "wtf/RefPtr.h" |
| 14 |
| 15 #include <iosfwd> |
| 16 |
| 17 namespace blink { |
| 18 |
| 19 // A transform created by a css property such as "transform" or "perspective" |
| 20 // along with a reference to the parent TransformPaintPropertyNode, or nullptr |
| 21 // for the root. |
| 22 class PLATFORM_EXPORT TransformPaintPropertyNode : public RefCounted<TransformPa
intPropertyNode> { |
| 23 public: |
| 24 TransformPaintPropertyNode(const TransformationMatrix& matrix, const FloatPo
int3D& origin, PassRefPtr<TransformPaintPropertyNode> parent = nullptr) |
| 25 : m_matrix(matrix), m_origin(origin), m_parent(parent) { } |
| 26 |
| 27 const TransformationMatrix& matrix() const { return m_matrix; } |
| 28 const FloatPoint3D& origin() const { return m_origin; } |
| 29 |
| 30 // Parent transform that this transform is relative to, or nullptr if this |
| 31 // is the root transform. |
| 32 const TransformPaintPropertyNode* parent() const { return m_parent.get(); } |
| 33 |
| 34 private: |
| 35 const TransformationMatrix m_matrix; |
| 36 const FloatPoint3D m_origin; |
| 37 RefPtr<TransformPaintPropertyNode> m_parent; |
| 38 }; |
| 39 |
| 40 // Redeclared here to avoid ODR issues. |
| 41 // See platform/testing/PaintPrinters.h. |
| 42 void PrintTo(const TransformPaintPropertyNode&, std::ostream*); |
| 43 |
| 44 } // namespace blink |
| 45 |
| 46 #endif // TransformPaintPropertyNode_h |
| OLD | NEW |