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. |