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 ClipPaintPropertyNode_h | 5 #ifndef ClipPaintPropertyNode_h |
6 #define ClipPaintPropertyNode_h | 6 #define ClipPaintPropertyNode_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/geometry/FloatRoundedRect.h" | 9 #include "platform/geometry/FloatRoundedRect.h" |
10 #include "platform/graphics/paint/GeometryMapperClipCache.h" | 10 #include "platform/graphics/paint/GeometryMapperClipCache.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bool hasDirectCompositingReasons() const { | 88 bool hasDirectCompositingReasons() const { |
89 return m_directCompositingReasons != CompositingReasonNone; | 89 return m_directCompositingReasons != CompositingReasonNone; |
90 } | 90 } |
91 | 91 |
92 private: | 92 private: |
93 ClipPaintPropertyNode( | 93 ClipPaintPropertyNode( |
94 PassRefPtr<const ClipPaintPropertyNode> parent, | 94 PassRefPtr<const ClipPaintPropertyNode> parent, |
95 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, | 95 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, |
96 const FloatRoundedRect& clipRect, | 96 const FloatRoundedRect& clipRect, |
97 CompositingReasons directCompositingReasons) | 97 CompositingReasons directCompositingReasons) |
98 : m_parent(parent), | 98 : m_parent(std::move(parent)), |
99 m_localTransformSpace(localTransformSpace), | 99 m_localTransformSpace(std::move(localTransformSpace)), |
100 m_clipRect(clipRect), | 100 m_clipRect(clipRect), |
101 m_directCompositingReasons(directCompositingReasons) {} | 101 m_directCompositingReasons(directCompositingReasons) {} |
102 | 102 |
103 // For access to getClipCache(); | 103 // For access to getClipCache(); |
104 friend class GeometryMapper; | 104 friend class GeometryMapper; |
105 friend class GeometryMapperTest; | 105 friend class GeometryMapperTest; |
106 | 106 |
107 GeometryMapperClipCache& getClipCache() const { | 107 GeometryMapperClipCache& getClipCache() const { |
108 return const_cast<ClipPaintPropertyNode*>(this)->getClipCache(); | 108 return const_cast<ClipPaintPropertyNode*>(this)->getClipCache(); |
109 } | 109 } |
(...skipping 12 matching lines...) Expand all Loading... |
122 std::unique_ptr<GeometryMapperClipCache> m_geometryMapperClipCache; | 122 std::unique_ptr<GeometryMapperClipCache> m_geometryMapperClipCache; |
123 }; | 123 }; |
124 | 124 |
125 // Redeclared here to avoid ODR issues. | 125 // Redeclared here to avoid ODR issues. |
126 // See platform/testing/PaintPrinters.h. | 126 // See platform/testing/PaintPrinters.h. |
127 void PrintTo(const ClipPaintPropertyNode&, std::ostream*); | 127 void PrintTo(const ClipPaintPropertyNode&, std::ostream*); |
128 | 128 |
129 } // namespace blink | 129 } // namespace blink |
130 | 130 |
131 #endif // ClipPaintPropertyNode_h | 131 #endif // ClipPaintPropertyNode_h |
OLD | NEW |