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

Unified Diff: Source/WebCore/rendering/RenderLayerCompositor.cpp

Issue 13859006: Rework composited scrolling updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@early-out2
Patch Set: . Created 7 years, 8 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/WebCore/rendering/RenderLayerCompositor.cpp
diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp
index d49df157b71d16d3dfb4c9338d8e85178bce5db7..65c35e245cd4d5b9b777de4bebee187dbf5d7b66 100644
--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp
@@ -323,6 +323,22 @@ bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer*
return m_compositedLayerCount > (rootLayer->isComposited() ? 1 : 0);
}
+void RenderLayerCompositor::updateDescendantsAreContiguousInStackingOrderRecursive(RenderLayer* layer)
+{
+ for (RenderLayer* child = layer->firstChild(); child; child = child->nextSibling())
+ updateDescendantsAreContiguousInStackingOrderRecursive(child);
+
+ if (layer->isStackingContext() && layer->m_descendantsAreContiguousInStackingOrderDirty)
+ layer->updateDescendantsAreContiguousInStackingOrder();
+}
+
+void RenderLayerCompositor::updateNeedsCompositedScrolling(RenderLayer* layer)
+{
+ layer->updateNeedsCompositedScrolling();
+ for (RenderLayer* child = layer->firstChild(); child; child = child->nextSibling())
+ updateNeedsCompositedScrolling(child);
+}
+
void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType updateType, RenderLayer* updateRoot)
{
m_updateCompositingLayersTimer.stop();
@@ -383,6 +399,11 @@ void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update
#endif
if (checkForHierarchyUpdate) {
+ // FIXME(vollick): can we skip this altogether in some cases?
+ updateRoot->updateDescendantDependentFlags();
+ updateDescendantsAreContiguousInStackingOrderRecursive(updateRoot);
+ updateNeedsCompositedScrolling(updateRoot);
+
// Go through the layers in presentation order, so that we can compute which RenderLayers need compositing layers.
// FIXME: we could maybe do this and the hierarchy udpate in one pass, but the parenting logic would be more complex.
CompositingState compState(updateRoot, m_compositingConsultsOverlap);
« Source/WebCore/rendering/RenderLayer.cpp ('K') | « Source/WebCore/rendering/RenderLayerCompositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698