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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2495893002: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Suppress main thread scrolling invalidation failures Created 4 years, 1 month 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/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.h
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h
index c68752363135fa17879613f10c06f4ef641d5330..bddc5229f24f56c833dbb797afd97dca7b80bcb2 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -724,6 +724,18 @@ class CORE_EXPORT FrameView final
return m_totalPropertyTreeStateForContents.get();
}
+ // Paint properties (e.g., m_preTranslation, etc.) are built from the
+ // FrameView's state (e.g., x(), y(), etc.) as well as inherited context.
+ // When these inputs change, setNeedsPaintPropertyUpdate will cause a property
+ // tree update during the next document lifecycle update.
+ // TODO(pdr): Add additional granularity such as the ability to signal that
+ // only a local paint property update is needed.
+ void setNeedsPaintPropertyUpdate() { m_needsPaintPropertyUpdate = true; }
+ void clearNeedsPaintPropertyUpdate() {
+ DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint);
+ m_needsPaintPropertyUpdate = false;
+ }
+ bool needsPaintPropertyUpdate() const { return m_needsPaintPropertyUpdate; }
// TODO(ojan): Merge this with IntersectionObserver once it lands.
IntRect computeVisibleArea();
@@ -1071,6 +1083,9 @@ class CORE_EXPORT FrameView final
// properties are either created by this FrameView or are inherited from
// an ancestor.
std::unique_ptr<PropertyTreeState> m_totalPropertyTreeStateForContents;
+ // Whether the paint properties need to be updated. For more details, see
+ // FrameView::needsPaintPropertyUpdate().
+ bool m_needsPaintPropertyUpdate;
// This is set on the local root frame view only.
DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState;
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698