void RenderView::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState) { ASSERT(!needsLayout()); // We specifically need to issue paint invalidations for the viewRect since other renderers // short-circuit on full-paint invalidation. LayoutRect dirtyRect = viewRect(); if (doingFullPaintInvalidation() && !dirtyRect.isEmpty()) { const RenderLayerModelObject* paintInvalidationContainer = &paintInvalidationState.paintInvalidationContainer(); RenderLayer::mapRectToPaintInvalidationBacking(this, paintInvalidationContainer, dirtyRect, &paintInvalidationState); invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRect, PaintInvalidationFull); } RenderBlock::invalidateTreeIfNeeded(paintInvalidationState); }
void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState) { ASSERT(!needsLayout()); if (!shouldCheckForPaintInvalidation(paintInvalidationState)) return; bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer(); const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer()); ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation()); InvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer); clearPaintInvalidationState(paintInvalidationState); PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer); if (reason == InvalidationLocationChange || reason == InvalidationFull) childTreeWalkState.setForceCheckForPaintInvalidation(); invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); }
void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState) { ASSERT(!needsLayout()); if (!shouldCheckForPaintInvalidation(paintInvalidationState)) return; bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer(); const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer()); // FIXME: This assert should be re-enabled when we move paint invalidation to after compositing update. crbug.com/360286 // ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation()); PaintInvalidationReason reason = invalidatePaintIfNeeded(paintInvalidationState, newPaintInvalidationContainer); clearPaintInvalidationState(paintInvalidationState); PaintInvalidationState childTreeWalkState(paintInvalidationState, *this, newPaintInvalidationContainer); if (reason == PaintInvalidationLocationChange) childTreeWalkState.setForceCheckForPaintInvalidation(); invalidatePaintOfSubtreesIfNeeded(childTreeWalkState); }