New issue
Advanced search Search tips

Issue 832645 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

aura::WindowOcclusionTracker: Recompute occlusion at most once per frame.

Project Member Reported by fdoray@chromium.org, Apr 13 2018

Issue description

Currently, occlusion is recomputed in response to changes to the window tree. It would be more efficient to simply set a bit when the window tree changes, and recompute occlusion only before the next frame is rendered. If multiple changes to the window tree occur within the same frame, occlusion wouldn't be recomputed multiple times.

Note: We currently have ScopedPauseOcclusionTracking to limit the number of times that occlusion is recomputed within a scope to 1. However, it is challenging to find all the places where a lot of window tree changes happen in sequence to annotate them with ScopedPauseOcclusionTracking.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 13 2018

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

commit 8a67aa878448792b3e57c219663a3965c41c953b
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Apr 13 20:40:44 2018

Pause occlusion tracking when reordering native views.

Reordering native views causes multiple changes to the window tree.
This CL instantiates a ScopedPauseOcclusionTracking in
DesktopNativeWidgetAura to ensure that occlusion is recomputed after
the reordering is done rather than after each individual change.

Note: It has been discussed that occlusion should be recompute once
per frame if the window tree has changed since the last frame, rather
than in direct response to window tree changes. That would fix this
issue. However, it is a more involved change, so having this simple
fix in the meantime is still relevant. https://crbug.com/832645

Bug:  829918 , 832645
Change-Id: I043be75b53ee10683f8bd5bdbe298bdbcf54a987
Reviewed-on: https://chromium-review.googlesource.com/1010602
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550750}
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8a67aa878448792b3e57c219663a3965c41c953b

commit 8a67aa878448792b3e57c219663a3965c41c953b
Author: Francois Doray <fdoray@chromium.org>
Date: Fri Apr 13 20:40:44 2018

Pause occlusion tracking when reordering native views.

Reordering native views causes multiple changes to the window tree.
This CL instantiates a ScopedPauseOcclusionTracking in
DesktopNativeWidgetAura to ensure that occlusion is recomputed after
the reordering is done rather than after each individual change.

Note: It has been discussed that occlusion should be recompute once
per frame if the window tree has changed since the last frame, rather
than in direct response to window tree changes. That would fix this
issue. However, it is a more involved change, so having this simple
fix in the meantime is still relevant. https://crbug.com/832645

Bug:  829918 , 832645
Change-Id: I043be75b53ee10683f8bd5bdbe298bdbcf54a987
Reviewed-on: https://chromium-review.googlesource.com/1010602
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550750}
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/test/window_occlusion_tracker_test_api.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
[modify] https://crrev.com/8a67aa878448792b3e57c219663a3965c41c953b/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

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

Sign in to add a comment