| Index: Source/core/rendering/RenderLayerCompositor.cpp
|
| diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
|
| index ad4ee6295990a1ac396be59b0bf122eec013d79c..68948048fa16b19190f95d2683f835836cab75e2 100644
|
| --- a/Source/core/rendering/RenderLayerCompositor.cpp
|
| +++ b/Source/core/rendering/RenderLayerCompositor.cpp
|
| @@ -218,6 +218,8 @@ RenderLayerCompositor::RenderLayerCompositor(RenderView* renderView)
|
| , m_compositingLayersNeedRebuild(false)
|
| , m_forceCompositingMode(false)
|
| , m_inPostLayoutUpdate(false)
|
| + // PATCH 2
|
| + , m_needsUpdateCompositingRequirementsState(false)
|
| , m_isTrackingRepaints(false)
|
| , m_rootLayerAttachment(RootLayerUnattached)
|
| #if !LOG_DISABLED
|
| @@ -330,6 +332,46 @@ bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer*
|
| return m_compositedLayerCount > (rootLayer->isComposited() ? 1 : 0);
|
| }
|
|
|
| +// PATCH 2
|
| +void RenderLayerCompositor::updateCompositingRequirementsState(CompositingUpdateType updateType, RenderLayer* updateRoot)
|
| +{
|
| + if (!m_needsUpdateCompositingRequirementsState)
|
| + return;
|
| +
|
| + const bool firstIteration = !updateRoot;
|
| + if (!updateRoot) {
|
| + bool needsUpdateHasOutOfFlowPositionedDescendant = false;
|
| + switch (updateType) {
|
| + case CompositingUpdateAfterStyleChange:
|
| + needsUpdateHasOutOfFlowPositionedDescendant = true;
|
| + break;
|
| + case CompositingUpdateAfterLayout:
|
| + break;
|
| + case CompositingUpdateOnScroll:
|
| + case CompositingUpdateOnCompositedScroll:
|
| + ASSERT_NOT_REACHED();
|
| + break;
|
| + }
|
| +
|
| + updateRoot = rootRenderLayer();
|
| + updateRoot->updateDescendantDependentFlags();
|
| + if (needsUpdateHasOutOfFlowPositionedDescendant) {
|
| + updateRoot->updateHasOutOfFlowPositionedDescendant();
|
| + }
|
| + }
|
| +
|
| + 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())
|
| + updateCompositingRequirementsState(updateType, child);
|
| +
|
| + if (firstIteration)
|
| + 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.
|
|
|