Commit f1bfab6c authored by Stefan Zager's avatar Stefan Zager Committed by Chromium LUCI CQ

Force compositing update for parent of throttled composited iframe

Speculative fix for crasher. If a throttled iframe is composited,
CompositingRequirementsUpdater running on the parent document should
notice the composited iframe and force compositing in the parent
document. However, CompositingRequirementsUpdater will not run in the
parent frame if the parent is not marked as needing compositing
update.

If the hypothesis is correct, it's still not clear how this situation
can happen. A throttled iframe will not run compositing assignment
update, so the state of its root graphics layer should not change,
and the parent document should already be compositing and shouldn't
need to run CompositingRequirementsUpdater.

Bug: 1133662
Change-Id: Ica6ffbac1ae192c6795ef4b1379b9f2b919cf729
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2644350
Commit-Queue: Stefan Zager <szager@chromium.org>
Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846391}
parent d580ba7c
...@@ -196,8 +196,21 @@ void PaintLayerCompositor::UpdateAssignmentsIfNeededRecursiveInternal( ...@@ -196,8 +196,21 @@ void PaintLayerCompositor::UpdateAssignmentsIfNeededRecursiveInternal(
if (target_state == DocumentLifecycle::kCompositingInputsClean) if (target_state == DocumentLifecycle::kCompositingInputsClean)
return; return;
if (layout_view_->GetFrameView()->ShouldThrottleRendering()) if (layout_view_->GetFrameView()->ShouldThrottleRendering()) {
if (auto* owner = layout_view_->GetFrame()->OwnerLayoutObject()) {
auto* parent_compositor = owner->View()->Compositor();
DCHECK(parent_compositor);
DisableCompositingQueryAsserts query_assert_disabler;
// TODO(szager): It's not clear how this can happen. Even if the child
// frame is throttled, if the child compositor has a root graphics layer,
// then the parent compositor should be in compositing mode.
DCHECK(parent_compositor->StaleInCompositingMode() ||
!RootGraphicsLayer());
if (!parent_compositor->StaleInCompositingMode() && RootGraphicsLayer())
root_layer_attachment_dirty_ = true;
}
return; return;
}
if (DisplayLockUtilities::PrePaintBlockedInParentFrame(layout_view_)) if (DisplayLockUtilities::PrePaintBlockedInParentFrame(layout_view_))
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment