Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(669)

Side by Side Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h

Issue 2292273003: Define contentsProperties on ObjectPaintProperties, for use in paint invalidation. (Closed)
Patch Set: none Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 const TransformPaintPropertyNode* transform() const { return m_transform.get (); } 52 const TransformPaintPropertyNode* transform() const { return m_transform.get (); }
53 const TransformPaintPropertyNode* perspective() const { return m_perspective .get(); } 53 const TransformPaintPropertyNode* perspective() const { return m_perspective .get(); }
54 const TransformPaintPropertyNode* svgLocalToBorderBoxTransform() const { ret urn m_svgLocalToBorderBoxTransform.get(); } 54 const TransformPaintPropertyNode* svgLocalToBorderBoxTransform() const { ret urn m_svgLocalToBorderBoxTransform.get(); }
55 const TransformPaintPropertyNode* scrollTranslation() const { return m_scrol lTranslation.get(); } 55 const TransformPaintPropertyNode* scrollTranslation() const { return m_scrol lTranslation.get(); }
56 const TransformPaintPropertyNode* scrollbarPaintOffset() const { return m_sc rollbarPaintOffset.get(); } 56 const TransformPaintPropertyNode* scrollbarPaintOffset() const { return m_sc rollbarPaintOffset.get(); }
57 57
58 const EffectPaintPropertyNode* effect() const { return m_effect.get(); } 58 const EffectPaintPropertyNode* effect() const { return m_effect.get(); }
59 59
60 // The hierarchy of the clip subtree created by a LayoutObject is as follows : 60 // The hierarchy of the clip subtree created by a LayoutObject is as follows :
61 // [ css clip ] 61 // [ css clip ]
62 // [ css clip fixed position]
62 // | 63 // |
63 // +--- [ overflow clip ] 64 // +--- [ overflow clip ]
64 const ClipPaintPropertyNode* cssClip() const { return m_cssClip.get(); } 65 const ClipPaintPropertyNode* cssClip() const { return m_cssClip.get(); }
65 const ClipPaintPropertyNode* cssClipFixedPosition() const { return m_cssClip FixedPosition.get(); } 66 const ClipPaintPropertyNode* cssClipFixedPosition() const { return m_cssClip FixedPosition.get(); }
66 const ClipPaintPropertyNode* overflowClip() const { return m_overflowClip.ge t(); } 67 const ClipPaintPropertyNode* overflowClip() const { return m_overflowClip.ge t(); }
67 68
68 // This is a complete set of property nodes that should be used as a startin g point to paint 69 // This is a complete set of property nodes that should be used as a startin g point to paint
69 // this layout object. It is needed becauase some property inherits from the containing block, 70 // this layout object. It is needed becauase some property inherits from the containing block,
70 // not painting parent, thus can't be derived in O(1) during paint walk. 71 // not painting parent, thus can't be derived in O(1) during paint walk.
71 // Note: If this layout object has transform or stacking-context effects, th ose are already 72 // Note: If this layout object has transform or stacking-context effects, th ose are already
72 // baked into in the context here. However for properties that affects only children, 73 // baked into in the context here. However for properties that affects only children,
73 // for example, perspective and overflow clip, those should be applied by th e painter 74 // for example, perspective and overflow clip, those should be applied by th e painter
74 // at the right painting step. 75 // at the right painting step.
75 struct LocalBorderBoxProperties { 76 struct LocalBorderBoxProperties {
76 LayoutPoint paintOffset; 77 LayoutPoint paintOffset;
77 PropertyTreeState propertyTreeState; 78 PropertyTreeState propertyTreeState;
78 }; 79 };
79 const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_ localBorderBoxProperties.get(); } 80 const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_ localBorderBoxProperties.get(); }
81 // ContentsProperties is the PropertyTreeState state that is the same as in localBorderBoxProperties, except that it is inside
82 // any clips and scrolls caused by this object. This PropertyTreeState is su itable as the destination for paint invalidation.
83 void getContentsProperties(PropertyTreeState&) const;
80 84
81 void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; } 85 void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; }
82 void clearTransform() { m_transform = nullptr; } 86 void clearTransform() { m_transform = nullptr; }
83 void clearEffect() { m_effect = nullptr; } 87 void clearEffect() { m_effect = nullptr; }
84 void clearCssClip() { m_cssClip = nullptr; } 88 void clearCssClip() { m_cssClip = nullptr; }
85 void clearCssClipFixedPosition() { m_cssClipFixedPosition = nullptr; } 89 void clearCssClipFixedPosition() { m_cssClipFixedPosition = nullptr; }
86 void clearOverflowClip() { m_overflowClip = nullptr; } 90 void clearOverflowClip() { m_overflowClip = nullptr; }
87 void clearPerspective() { m_perspective = nullptr; } 91 void clearPerspective() { m_perspective = nullptr; }
88 void clearSvgLocalToBorderBoxTransform() { m_svgLocalToBorderBoxTransform = nullptr; } 92 void clearSvgLocalToBorderBoxTransform() { m_svgLocalToBorderBoxTransform = nullptr; }
89 void clearScrollTranslation() { m_scrollTranslation = nullptr; } 93 void clearScrollTranslation() { m_scrollTranslation = nullptr; }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 RefPtr<TransformPaintPropertyNode> m_svgLocalToBorderBoxTransform; 138 RefPtr<TransformPaintPropertyNode> m_svgLocalToBorderBoxTransform;
135 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; 139 RefPtr<TransformPaintPropertyNode> m_scrollTranslation;
136 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; 140 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset;
137 141
138 std::unique_ptr<LocalBorderBoxProperties> m_localBorderBoxProperties; 142 std::unique_ptr<LocalBorderBoxProperties> m_localBorderBoxProperties;
139 }; 143 };
140 144
141 } // namespace blink 145 } // namespace blink
142 146
143 #endif // ObjectPaintProperties_h 147 #endif // ObjectPaintProperties_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698