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

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

Issue 2404213004: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Fix bug in how svg local to border box was updated, no longer crash in tests Created 4 years, 2 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
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 4419f0c5a9bc85c9c156bda820d95ee6ba10c10f..7afacec88119ed27cceb6ea984fc2837e3cb65dd 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.h
+++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -718,6 +718,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.) and need to be invalidated when
+ // these values change (see: PaintPropertyTreeBuilder::updateProperties).
+ // Invalid paint properties will be rebuilt during the next lifecycle update
+ // (see: FrameView::updatePaintProperties).
+ void setPaintPropertiesInvalid() { m_paintPropertiesValid = false; }
chrishtr 2016/10/21 22:03:09 ...Invalid is different nomenclature from invalida
pdr. 2016/10/26 03:10:48 I've switched this to the following which is simil
+ void setPaintPropertiesValid() {
+ DCHECK_EQ(lifecycle().state(), DocumentLifecycle::InPrePaint);
+ m_paintPropertiesValid = true;
+ }
+ bool paintPropertiesValid() const { return m_paintPropertiesValid; }
+
// TODO(ojan): Merge this with IntersectionObserver once it lands.
IntRect computeVisibleArea();
@@ -1059,6 +1071,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;
+ // True if the paint properties are up-to-date with the FrameView's state.
+ // See: setPaintPropertiesValid and setPaintPropertiesInvalid.
+ bool m_paintPropertiesValid = false;
// This is set on the local root frame view only.
DocumentLifecycle::LifecycleState m_currentUpdateLifecyclePhasesTargetState;

Powered by Google App Engine
This is Rietveld 408576698