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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h

Issue 2351433002: Switch LocalBorderBoxProperties to store raw pointers (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
index 026c5eceb156f1b8171764fc1aeddb19f4004363..69eb7ef55ec10278a2bef5c856abb3c77a673ffc 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
@@ -29,8 +29,6 @@ class CORE_EXPORT ObjectPaintProperties {
WTF_MAKE_NONCOPYABLE(ObjectPaintProperties);
USING_FAST_MALLOC(ObjectPaintProperties);
public:
- struct LocalBorderBoxProperties;
-
static std::unique_ptr<ObjectPaintProperties> create()
{
return wrapUnique(new ObjectPaintProperties());
@@ -72,24 +70,6 @@ public:
const ClipPaintPropertyNode* cssClipFixedPosition() const { return m_cssClipFixedPosition.get(); }
const ClipPaintPropertyNode* overflowClip() const { return m_overflowClip.get(); }
- // This is a complete set of property nodes that should be used as a starting point to paint
- // this layout object. It is needed becauase some property inherits from the containing block,
- // not painting parent, thus can't be derived in O(1) during paint walk.
- // Note: If this layout object has transform or stacking-context effects, those are already
- // baked into in the context here. However for properties that affects only children,
- // for example, perspective and overflow clip, those should be applied by the painter
- // at the right painting step.
- struct LocalBorderBoxProperties {
- LayoutPoint paintOffset;
- GeometryPropertyTreeState geometryPropertyTreeState;
- const ScrollPaintPropertyNode* scroll;
- };
- const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_localBorderBoxProperties.get(); }
- // ContentsProperties is the GeometryPropertyTreeState that is the same as in
- // localBorderBoxProperties, except that it is inside any clips and scrolls caused by this
- // object. This GeometryPropertyTreeState is suitable as the destination for paint invalidation.
- void getContentsProperties(GeometryPropertyTreeState&) const;
-
void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; }
void clearTransform() { m_transform = nullptr; }
void clearEffect() { m_effect = nullptr; }
@@ -122,7 +102,28 @@ public:
template <typename... Args> ClipPaintPropertyNode* createOrUpdateCssClipFixedPosition(Args&&... args) { return createOrUpdateProperty(m_cssClipFixedPosition, std::forward<Args>(args)...); }
template <typename... Args> ClipPaintPropertyNode* createOrUpdateOverflowClip(Args&&... args) { return createOrUpdateProperty(m_overflowClip, std::forward<Args>(args)...); }
+ // This is a complete set of property nodes that should be used as a starting point to paint
+ // this layout object. It is needed becauase some property inherits from the containing block,
jbroman 2016/09/21 15:23:17 nit: s/becauase/because/
+ // not painting parent, thus can't be derived in O(1) during paint walk.
+ // Note: If this layout object has transform or stacking-context effects, those are already
+ // baked into in the context here. However for properties that affects only children,
+ // for example, perspective and overflow clip, those should be applied by the painter
+ // at the right painting step.
+ struct LocalBorderBoxProperties {
+ LayoutPoint paintOffset;
+ const TransformPaintPropertyNode* transform;
+ const ClipPaintPropertyNode* clip;
+ const EffectPaintPropertyNode* effect;
+ const ScrollPaintPropertyNode* scroll;
+ };
+
void setLocalBorderBoxProperties(std::unique_ptr<LocalBorderBoxProperties> properties) { m_localBorderBoxProperties = std::move(properties); }
+ const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_localBorderBoxProperties.get(); }
+
+ // ContentsProperties returns the same property tree state in localBorderBoxProperties
+ // but modified to be inside any clips and scrolls caused by this object. This
+ // GeometryPropertyTreeState is suitable as the destination for paint invalidation.
+ GeometryPropertyTreeState getContentsProperties() const;
private:
ObjectPaintProperties() { }
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/ObjectPaintProperties.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698