Source/core/rendering/compositing/RenderLayerCompositor.cpp
// This method assumes that layout is up-to-date, unlike repaintOnCompositingChange().
This method assumes that layout is up-to-date, unlike repaintOnCompositingChange().
This method assumes that layout is up - to - date unlike repaintOnCompositingChange () .
void RenderLayerCompositor::repaintInCompositedAncestor(RenderLayer* layer, const LayoutRect& rect)
{
    RenderLayer* compositedAncestor = layer->enclosingCompositingLayerForRepaint(ExcludeSelf);
    if (!compositedAncestor)
        return;
    ASSERT(compositedAncestor->compositingState() == PaintsIntoOwnBacking || compositedAncestor->compositingState() == PaintsIntoGroupedBacking);
    LayoutPoint offset;
    layer->convertToLayerCoords(compositedAncestor, offset);
    LayoutRect repaintRect = rect;
    repaintRect.moveBy(offset);
    compositedAncestor->repainter().setBackingNeedsRepaintInRect(repaintRect);
}
void RenderLayerCompositor :: repaintInCompositedAncestor ( RenderLayer * layer , const LayoutRect & rect ) { RenderLayer * compositedAncestor = layer -> enclosingCompositingLayerForRepaint ( ExcludeSelf ) ; if ( ! compositedAncestor ) return ; ASSERT ( compositedAncestor -> compositingState ( ) == PaintsIntoOwnBacking || compositedAncestor -> compositingState ( ) == PaintsIntoGroupedBacking ) ; LayoutPoint offset ; layer -> convertToLayerCoords ( compositedAncestor , offset ) ; LayoutRect repaintRect = rect ; repaintRect . moveBy ( offset ) ; compositedAncestor -> repainter ( ) . setBackingNeedsRepaintInRect ( repaintRect ) ; }
This method assumes that layout is up-to-date, unlike repaintOnCompositingChange().
This method assumes that layout is up - to - date unlike repaintOnCompositingChange () .