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

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

Issue 14741004: NOT FOR REVIEW - Update comp-scrolling state at a well defined point in the pipeline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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/core/rendering/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index ad4ee6295990a1ac396be59b0bf122eec013d79c..9521c64c2e6bdbfb0d978ce8478ec39a7886490c 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -218,6 +218,7 @@ RenderLayerCompositor::RenderLayerCompositor(RenderView* renderView)
, m_compositingLayersNeedRebuild(false)
, m_forceCompositingMode(false)
, m_inPostLayoutUpdate(false)
+ , m_needsUpdateCompositingRequirementsState(false)
, m_isTrackingRepaints(false)
, m_rootLayerAttachment(RootLayerUnattached)
#if !LOG_DISABLED
@@ -330,6 +331,33 @@ bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer*
return m_compositedLayerCount > (rootLayer->isComposited() ? 1 : 0);
}
+void RenderLayerCompositor::updateCompositingRequirementsState(RenderLayer* updateRoot)
hartmanng 2013/05/01 20:25:07 I feel like updateDescendantDependentFlags should
Ian Vollick 2013/05/02 03:24:50 Done.
+{
+ TRACE_EVENT0("blink-rendering", "RenderLayerCompositor::updateCompositingRequirementsState\n");
+
+ if (!m_needsUpdateCompositingRequirementsState)
+ return;
+
+ if (!updateRoot) {
+ updateRoot = rootRenderLayer();
+ updateRoot->updateHasOutOfFlowPositionedDescendant();
hartmanng 2013/05/01 20:25:07 why do we only update this inside the if block?
Ian Vollick 2013/05/02 03:24:50 That call is recursive, so I only want to call it
+ }
+
+ updateRoot->updateNeedsCompositedScrolling();
+
+ // In this function we update state that determines whether layers are
+ // stacking containers. We may therefore not use this concept here. Instead,
+ // we'll iterate through the tree topologically.
+ for (RenderLayer* child = updateRoot->firstChild(); child; child = child->nextSibling()) {
+#ifndef NDEBUG
+ fprintf(stderr, "vollick: RenderLayerCompositor::updateCompositingRequirementsState\n");
+#endif
+ updateCompositingRequirementsState(child);
+ }
+
+ m_needsUpdateCompositingRequirementsState = false;
+}
+
void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType updateType, RenderLayer* updateRoot)
{
// Avoid updating the layers with old values. Compositing layers will be updated after the layout is finished.

Powered by Google App Engine
This is Rietveld 408576698