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

Unified Diff: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp

Issue 1149303002: Add a dirty bit for updateDescendantDependentFlags. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: try again. Created 5 years, 7 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: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
diff --git a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
index a4b079c4e5fd18abed61756a310302e1b8c3005a..9efd46d5e3b72090c2cb8767efc905fe9117bb0c 100644
--- a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
+++ b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
@@ -74,8 +74,9 @@ DeprecatedPaintLayerCompositor::DeprecatedPaintLayerCompositor(LayoutView& layou
, m_rootShouldAlwaysCompositeDirty(true)
, m_needsUpdateFixedBackground(false)
, m_isTrackingPaintInvalidations(false)
- , m_rootLayerAttachment(RootLayerUnattached)
, m_inOverlayFullscreenVideo(false)
+ , m_needsUpdateDescendantDependentFlags(false)
+ , m_rootLayerAttachment(RootLayerUnattached)
{
updateAcceleratedCompositingSettings();
}
@@ -182,6 +183,22 @@ 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.
+//
+// FIXME: Remove this function once the descendant-dependent flags system keeps
+// its dirty bits scoped to subtrees.
+void updateDescendantDependentFlagsForEntireSubtree(DeprecatedPaintLayer& layer)
+{
+ layer.updateDescendantDependentFlags();
+
+ for (DeprecatedPaintLayer* child = layer.firstChild(); child; child = child->nextSibling())
+ updateDescendantDependentFlagsForEntireSubtree(*child);
+}
+
void DeprecatedPaintLayerCompositor::updateIfNeededRecursive()
{
for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); child; child = child->tree().nextSibling()) {
@@ -205,7 +222,11 @@ void DeprecatedPaintLayerCompositor::updateIfNeededRecursive()
// which asserts that it's not InCompositingUpdate.
enableCompositingModeIfNeeded();
- rootLayer()->updateDescendantDependentFlagsForEntireSubtree();
+ if (m_needsUpdateDescendantDependentFlags) {
+ updateDescendantDependentFlagsForEntireSubtree(*rootLayer());
+ m_needsUpdateDescendantDependentFlags = false;
+ }
+
m_layoutView.commitPendingSelection();
lifecycle().advanceTo(DocumentLifecycle::InCompositingUpdate);
« no previous file with comments | « Source/core/layout/compositing/DeprecatedPaintLayerCompositor.h ('k') | Source/core/paint/DeprecatedPaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698