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

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

Issue 2539693002: Early-out from the prepaint tree walk (Closed)
Patch Set: Do not force subtree updates for all paint invalidation reasons, add todo to track paint offset cha… Created 4 years 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
Index: third_party/WebKit/Source/core/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 4e1c0378a975f62d073872a817b7331b429b8624..3cd0223da5741149b0df60ccad14b0fefc0e0342 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1703,6 +1703,9 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
void setNeedsPaintPropertyUpdate() {
m_layoutObject.setNeedsPaintPropertyUpdate();
}
+ void setNeedsPaintPropertyUpdateWithoutMarkingAncestors() {
+ m_layoutObject.setNeedsPaintPropertyUpdateWithoutMarkingAncestors();
+ }
void clearNeedsPaintPropertyUpdate() {
m_layoutObject.clearNeedsPaintPropertyUpdate();
}
@@ -1742,6 +1745,12 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
// descendant needs an update too. This bit is up the tree, crossing frames,
// when calling |setNeedsPaintPropertyUpdate|.
void setNeedsPaintPropertyUpdate();
+ // Same as |setNeedsPaintPropertyUpdate| but does not notify ancestors as
+ // having a descendant needing a paint property update.
+ void setNeedsPaintPropertyUpdateWithoutMarkingAncestors() {
+ DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
+ m_bitfields.setNeedsPaintPropertyUpdate(true);
+ }
bool needsPaintPropertyUpdate() const {
return m_bitfields.needsPaintPropertyUpdate();
}
@@ -1749,6 +1758,8 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
DCHECK_EQ(document().lifecycle().state(), DocumentLifecycle::InPrePaint);
m_bitfields.setNeedsPaintPropertyUpdate(false);
}
+ // Sets |descendantNeedsPaintPropertyUpdate| on this object and all ancestors.
+ void setDescendantNeedsPaintPropertyUpdate();
bool descendantNeedsPaintPropertyUpdate() const {
return m_bitfields.descendantNeedsPaintPropertyUpdate();
}

Powered by Google App Engine
This is Rietveld 408576698