| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 TransformPaintPropertyNode_h | 5 #ifndef TransformPaintPropertyNode_h |
| 6 #define TransformPaintPropertyNode_h | 6 #define TransformPaintPropertyNode_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/FloatPoint3D.h" | 9 #include "platform/geometry/FloatPoint3D.h" |
| 10 #include "platform/transforms/TransformationMatrix.h" | 10 #include "platform/transforms/TransformationMatrix.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 m_flattensInheritedTransform = flattensInheritedTransform; | 40 m_flattensInheritedTransform = flattensInheritedTransform; |
| 41 m_renderingContextID = renderingContextID; | 41 m_renderingContextID = renderingContextID; |
| 42 } | 42 } |
| 43 | 43 |
| 44 const TransformationMatrix& matrix() const { return m_matrix; } | 44 const TransformationMatrix& matrix() const { return m_matrix; } |
| 45 const FloatPoint3D& origin() const { return m_origin; } | 45 const FloatPoint3D& origin() const { return m_origin; } |
| 46 | 46 |
| 47 // Parent transform that this transform is relative to, or nullptr if this | 47 // Parent transform that this transform is relative to, or nullptr if this |
| 48 // is the root transform. | 48 // is the root transform. |
| 49 const TransformPaintPropertyNode* parent() const { return m_parent.get(); } | 49 const TransformPaintPropertyNode* parent() const { return m_parent.get(); } |
| 50 bool isRoot() const { return !m_parent; } |
| 50 | 51 |
| 51 // If true, content with this transform node (or its descendant) appears in | 52 // If true, content with this transform node (or its descendant) appears in |
| 52 // the plane of its parent. This is implemented by flattening the total | 53 // the plane of its parent. This is implemented by flattening the total |
| 53 // accumulated transform from its ancestors. | 54 // accumulated transform from its ancestors. |
| 54 bool flattensInheritedTransform() const { return m_flattensInheritedTransfor
m; } | 55 bool flattensInheritedTransform() const { return m_flattensInheritedTransfor
m; } |
| 55 | 56 |
| 56 // Content whose transform nodes have a common rendering context ID are 3D | 57 // Content whose transform nodes have a common rendering context ID are 3D |
| 57 // sorted. If this is 0, content will not be 3D sorted. | 58 // sorted. If this is 0, content will not be 3D sorted. |
| 58 unsigned renderingContextID() const { return m_renderingContextID; } | 59 unsigned renderingContextID() const { return m_renderingContextID; } |
| 59 bool hasRenderingContext() const { return m_renderingContextID; } | 60 bool hasRenderingContext() const { return m_renderingContextID; } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 80 unsigned m_renderingContextID; | 81 unsigned m_renderingContextID; |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 // Redeclared here to avoid ODR issues. | 84 // Redeclared here to avoid ODR issues. |
| 84 // See platform/testing/PaintPrinters.h. | 85 // See platform/testing/PaintPrinters.h. |
| 85 void PrintTo(const TransformPaintPropertyNode&, std::ostream*); | 86 void PrintTo(const TransformPaintPropertyNode&, std::ostream*); |
| 86 | 87 |
| 87 } // namespace blink | 88 } // namespace blink |
| 88 | 89 |
| 89 #endif // TransformPaintPropertyNode_h | 90 #endif // TransformPaintPropertyNode_h |
| OLD | NEW |