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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2785603002: Add LayoutObject::RarePaintData for rare paint data (Closed)
Patch Set: struct->class Created 3 years, 9 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 | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 2ad2dafd5ad4efee4139334035aa2744f7f2ee39..77a4e3d57718b037499ec70e144e0487df158d69 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -126,7 +126,7 @@ struct SameSizeAsLayoutObject : DisplayItemClient {
unsigned m_bitfields2;
LayoutRect m_visualRect;
LayoutPoint m_paintOffset;
- std::unique_ptr<void*> m_paintProperties;
+ std::unique_ptr<void*> m_rarePaintData;
};
static_assert(sizeof(LayoutObject) == sizeof(SameSizeAsLayoutObject),
@@ -3552,16 +3552,20 @@ void LayoutObject::setIsBackgroundAttachmentFixedObject(
frameView()->removeBackgroundAttachmentFixedObject(this);
}
-const ObjectPaintProperties* LayoutObject::paintProperties() const {
- DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
- return m_paintProperties.get();
-}
+LayoutObject::RarePaintData::RarePaintData() {}
+
+LayoutObject::RarePaintData::~RarePaintData() {}
-ObjectPaintProperties& LayoutObject::ensurePaintProperties() {
- DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
+ObjectPaintProperties& LayoutObject::RarePaintData::ensurePaintProperties() {
if (!m_paintProperties)
m_paintProperties = ObjectPaintProperties::create();
- return *m_paintProperties;
+ return *m_paintProperties.get();
+}
+
+LayoutObject::RarePaintData& LayoutObject::ensureRarePaintData() {
+ if (!m_rarePaintData)
+ m_rarePaintData = WTF::makeUnique<RarePaintData>();
+ return *m_rarePaintData.get();
}
LayoutRect LayoutObject::debugRect() const {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698