Source/core/rendering/compositing/RenderLayerCompositor.cpp
// These are temporary hacks to work around chicken-egg issues while we continue to refactor the compositing code.
// See crbug.com/383191 for a list of tests that fail if this method is removed.
These are temporary hacks to work around chicken-egg issues while we continue to refactor the compositing code.
See crbug.com/383191 for a list of tests that fail if this method is removed.
These are temporary hacks to work around chicken - egg issues while we continue to refactor the compositing code . See crbug . com / 383191 for a list of tests that fail if this method is removed .
void RenderLayerCompositor::applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer* layer, CompositingStateTransitionType compositedLayerUpdate)
{
    if (compositedLayerUpdate != NoCompositingStateChange) {
        bool compositedLayerMappingChanged = allocateOrClearCompositedLayerMapping(layer, compositedLayerUpdate);
        if (compositedLayerMappingChanged) {
            if (layer->parent())
                layer->repainter().computeRepaintRectsIncludingNonCompositingDescendants();
            repaintOnCompositingChange(layer);
        }
    }
}
void RenderLayerCompositor :: applyUpdateLayerCompositingStateChickenEggHacks ( RenderLayer * layer , CompositingStateTransitionType compositedLayerUpdate ) { if ( compositedLayerUpdate != NoCompositingStateChange ) { bool compositedLayerMappingChanged = allocateOrClearCompositedLayerMapping ( layer , compositedLayerUpdate ) ; if ( compositedLayerMappingChanged ) { if ( layer -> parent ( ) ) layer -> repainter ( ) . computeRepaintRectsIncludingNonCompositingDescendants ( ) ; repaintOnCompositingChange ( layer ) ; } } }
These are temporary hacks to work around chicken-egg issues while we continue to refactor the compositing code.
These are temporary hacks to work around chicken - egg issues while we continue to refactor the compositing code .
// Repaint rects can only be computed for layers that have already been attached to the // render tree, but a chicken-egg compositing update can happen before |layer| gets // attached. Since newly-created renderers don't get parented until they are attached // (see RenderTreeBuilder::createRendererForElementIfNeeded), we can check for attachment // by checking for a parent.