New issue
Advanced search Search tips

Issue 813076 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Maintain the maximum number of iterations in aura::WindowOcclusionTracker

Project Member Reported by fdoray@chromium.org, Feb 16 2018

Issue description

When a window tree changes, WindowOcclusionTracker recomputes occlusion states and notifies WindowDelegates. If those WindowDelegates change the window tree in response to an occlusion state change, occlusion states are computed again. |kMaxRecomputeOcclusion| sets a limit on the number of iterations that can occur. If too much iteration occur, a crash report is generated.

We should make sure that we don't receive such crash reports, and then remove the code that generates them.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a2f523dc9b60f1d5cd604986575d38a04af48beb

commit a2f523dc9b60f1d5cd604986575d38a04af48beb
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Feb 16 15:54:30 2018

Support changing the window tree from aura::WindowDelegate::OnWindowOcclusionChanged.

Some code in Chrome needs to change the window tree in response
to a change of visibility for a WebContents (e.g. close zoom
bubble, create a new RenderWidgetHostViewAura). Because of that,
we need to allow changes to the window tree from
aura::WindowDelegate::OnWindowOcclusionChanged().

With this CL, aura::Window::SetOcclusionState() is not called
immediately when the occlusion of a tracked window is computed.
Instead, we compute occlusion for all tracked windows. Then,
we call aura::Window::SetOcclusionState() on all tracked
windows. Having separate phases ensures that the window tree is
not modified while occlusion is being computed. If a call to
aura::Window::SetOcclusionState() in the 2nd phase changes the
window tree in a way that could affect occlusion, we go back
to phase 1. There is a hard cap of 2 iterations, after which we
crash.

Bug: 668690,  813076 
Change-Id: I61e5cdbb605343a5b587aeb96effcbd8dc07de33
Reviewed-on: https://chromium-review.googlesource.com/861953
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537310}
[modify] https://crrev.com/a2f523dc9b60f1d5cd604986575d38a04af48beb/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/a2f523dc9b60f1d5cd604986575d38a04af48beb/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/a2f523dc9b60f1d5cd604986575d38a04af48beb/ui/aura/window_occlusion_tracker_unittest.cc

Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/455eacbb9908bc2b7a260dacceef0b584244378b

commit 455eacbb9908bc2b7a260dacceef0b584244378b
Author: Francois Doray <fdoray@chromium.org>
Date: Thu Aug 09 13:48:15 2018

aura: DCHECK when occlusion is recomputed too many times.

Before this CL, recomputing occlusion too many times before occlusion
states became stable caused a call to DumpWithoutCrashing(). Now that
we didn't get any crash reports in the last 6 months, this CL replaces
the DumpWithoutCrashing() with a simple DCHECK.

Bug:  813076 
Change-Id: I2ec8c5fa89a1646367035c3585df091a9a4f76cc
Reviewed-on: https://chromium-review.googlesource.com/1168024
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581887}
[modify] https://crrev.com/455eacbb9908bc2b7a260dacceef0b584244378b/ui/aura/test/window_occlusion_tracker_test_api.cc
[modify] https://crrev.com/455eacbb9908bc2b7a260dacceef0b584244378b/ui/aura/test/window_occlusion_tracker_test_api.h
[modify] https://crrev.com/455eacbb9908bc2b7a260dacceef0b584244378b/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/455eacbb9908bc2b7a260dacceef0b584244378b/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/455eacbb9908bc2b7a260dacceef0b584244378b/ui/aura/window_occlusion_tracker_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment