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 ObjectPaintProperties_h | 5 #ifndef ObjectPaintProperties_h |
6 #define ObjectPaintProperties_h | 6 #define ObjectPaintProperties_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/geometry/LayoutPoint.h" | 9 #include "platform/geometry/LayoutPoint.h" |
10 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 10 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
11 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 11 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
| 12 #include "platform/graphics/paint/GeometryPropertyTreeState.h" |
12 #include "platform/graphics/paint/PaintChunkProperties.h" | 13 #include "platform/graphics/paint/PaintChunkProperties.h" |
13 #include "platform/graphics/paint/PropertyTreeState.h" | |
14 #include "platform/graphics/paint/ScrollPaintPropertyNode.h" | 14 #include "platform/graphics/paint/ScrollPaintPropertyNode.h" |
15 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 15 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
16 #include "wtf/PassRefPtr.h" | 16 #include "wtf/PassRefPtr.h" |
17 #include "wtf/PtrUtil.h" | 17 #include "wtf/PtrUtil.h" |
18 #include "wtf/RefPtr.h" | 18 #include "wtf/RefPtr.h" |
19 #include <memory> | 19 #include <memory> |
20 | 20 |
21 namespace blink { | 21 namespace blink { |
22 | 22 |
23 // This class stores property tree related information associated with a LayoutO
bject. | 23 // This class stores property tree related information associated with a LayoutO
bject. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 // This is a complete set of property nodes that should be used as a startin
g point to paint | 75 // This is a complete set of property nodes that should be used as a startin
g point to paint |
76 // this layout object. It is needed becauase some property inherits from the
containing block, | 76 // this layout object. It is needed becauase some property inherits from the
containing block, |
77 // not painting parent, thus can't be derived in O(1) during paint walk. | 77 // not painting parent, thus can't be derived in O(1) during paint walk. |
78 // Note: If this layout object has transform or stacking-context effects, th
ose are already | 78 // Note: If this layout object has transform or stacking-context effects, th
ose are already |
79 // baked into in the context here. However for properties that affects only
children, | 79 // baked into in the context here. However for properties that affects only
children, |
80 // for example, perspective and overflow clip, those should be applied by th
e painter | 80 // for example, perspective and overflow clip, those should be applied by th
e painter |
81 // at the right painting step. | 81 // at the right painting step. |
82 struct LocalBorderBoxProperties { | 82 struct LocalBorderBoxProperties { |
83 LayoutPoint paintOffset; | 83 LayoutPoint paintOffset; |
84 // TODO(pdr): Rename this GeometryPropertyTreeState because it does not
contain scroll. | 84 GeometryPropertyTreeState geometryPropertyTreeState; |
85 PropertyTreeState propertyTreeState; | |
86 const ScrollPaintPropertyNode* scroll; | 85 const ScrollPaintPropertyNode* scroll; |
87 }; | 86 }; |
88 const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_
localBorderBoxProperties.get(); } | 87 const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_
localBorderBoxProperties.get(); } |
89 // ContentsProperties is the PropertyTreeState state that is the same as in
localBorderBoxProperties, except that it is inside | 88 // ContentsProperties is the GeometryPropertyTreeState that is the same as i
n |
90 // any clips and scrolls caused by this object. This PropertyTreeState is su
itable as the destination for paint invalidation. | 89 // localBorderBoxProperties, except that it is inside any clips and scrolls
caused by this |
91 void getContentsProperties(PropertyTreeState&) const; | 90 // object. This GeometryPropertyTreeState is suitable as the destination for
paint invalidation. |
| 91 void getContentsProperties(GeometryPropertyTreeState&) const; |
92 | 92 |
93 void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; } | 93 void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; } |
94 void clearTransform() { m_transform = nullptr; } | 94 void clearTransform() { m_transform = nullptr; } |
95 void clearEffect() { m_effect = nullptr; } | 95 void clearEffect() { m_effect = nullptr; } |
96 void clearCssClip() { m_cssClip = nullptr; } | 96 void clearCssClip() { m_cssClip = nullptr; } |
97 void clearCssClipFixedPosition() { m_cssClipFixedPosition = nullptr; } | 97 void clearCssClipFixedPosition() { m_cssClipFixedPosition = nullptr; } |
98 void clearOverflowClip() { m_overflowClip = nullptr; } | 98 void clearOverflowClip() { m_overflowClip = nullptr; } |
99 void clearPerspective() { m_perspective = nullptr; } | 99 void clearPerspective() { m_perspective = nullptr; } |
100 void clearSvgLocalToBorderBoxTransform() { m_svgLocalToBorderBoxTransform =
nullptr; } | 100 void clearSvgLocalToBorderBoxTransform() { m_svgLocalToBorderBoxTransform =
nullptr; } |
101 void clearScrollTranslation() { m_scrollTranslation = nullptr; } | 101 void clearScrollTranslation() { m_scrollTranslation = nullptr; } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 149 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
150 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; | 150 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; |
151 RefPtr<ScrollPaintPropertyNode> m_scroll; | 151 RefPtr<ScrollPaintPropertyNode> m_scroll; |
152 | 152 |
153 std::unique_ptr<LocalBorderBoxProperties> m_localBorderBoxProperties; | 153 std::unique_ptr<LocalBorderBoxProperties> m_localBorderBoxProperties; |
154 }; | 154 }; |
155 | 155 |
156 } // namespace blink | 156 } // namespace blink |
157 | 157 |
158 #endif // ObjectPaintProperties_h | 158 #endif // ObjectPaintProperties_h |
OLD | NEW |