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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 2540043002: Fix descendant-dependent PaintLayer flags update to not early-out when dirty. (Closed)
Patch Set: none 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
Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
index eaf50612712b8f8de2f60313519745cbed9427f4..b9d73d3d959d8fa41d465e2c96a7cd28a045b294 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -83,7 +83,6 @@ PaintLayerCompositor::PaintLayerCompositor(LayoutView& layoutView)
m_isTrackingRasterInvalidations(
layoutView.frameView()->isTrackingPaintInvalidations()),
m_inOverlayFullscreenVideo(false),
- m_needsUpdateDescendantDependentFlags(false),
m_rootLayerAttachment(RootLayerUnattached) {
updateAcceleratedCompositingSettings();
}
@@ -184,23 +183,6 @@ static LayoutVideo* findFullscreenVideoLayoutObject(Document& document) {
return toLayoutVideo(layoutObject);
}
-// The descendant-dependent flags system is badly broken because we clean dirty
-// bits in upward tree walks, which means we need to call
-// updateDescendantDependentFlags at every node in the tree to fully clean all
-// the dirty bits. While we'll in the process of fixing this issue,
-// updateDescendantDependentFlagsForEntireSubtree provides a big hammer for
-// actually cleaning all the dirty bits in a subtree.
chrishtr 2016/11/30 15:26:38 I thought about it for a long time and could not c
-//
-// FIXME: Remove this function once the descendant-dependent flags system keeps
-// its dirty bits scoped to subtrees.
-void updateDescendantDependentFlagsForEntireSubtree(PaintLayer& layer) {
- layer.updateDescendantDependentFlags();
-
- for (PaintLayer* child = layer.firstChild(); child;
- child = child->nextSibling())
- updateDescendantDependentFlagsForEntireSubtree(*child);
-}
-
void PaintLayerCompositor::updateIfNeededRecursive() {
SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime");
updateIfNeededRecursiveInternal();
@@ -238,10 +220,7 @@ void PaintLayerCompositor::updateIfNeededRecursiveInternal() {
// InCompositingUpdate.
enableCompositingModeIfNeeded();
- if (m_needsUpdateDescendantDependentFlags) {
- updateDescendantDependentFlagsForEntireSubtree(*rootLayer());
- m_needsUpdateDescendantDependentFlags = false;
- }
+ rootLayer()->updateDescendantDependentFlags();
m_layoutView.commitPendingSelection();

Powered by Google App Engine
This is Rietveld 408576698