New issue
Advanced search Search tips

Issue 867150 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 847992



Sign in to add a comment

Add ability for windowservice to track occlusion state

Project Member Reported by sky@chromium.org, Jul 24

Issue description

With mash the browser will no longer have visibility to the entire aura window hierarchy. As a result of this the browser will not know the true occlusion state of browser windows. We need to add an api to the window service so that clients can request the occlusion state of windows. If requested, the windowservice will then inform the client. This will allow the browser to know the true occlusion state. The API could specifically be something like:

WindowTree::SetTrackOcclusionState(Id window, bool value);
WindowTreeClient::OnOcclusionStateChanged(Id window, OcclusionState new_value);

This will result in extra hops for occlusion state that likely needs to be measured.
 
Labels: Proj-Mash-SingleProcess
Owner: xiy...@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 4

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

commit cb71563fcff798f7eb3faf05cbfaa067bd72277f
Author: Xiyuan Xia <xiyuan@chromium.org>
Date: Thu Oct 04 23:22:25 2018

aura: Env owns WindowOcclusionTracker

- Env owns WindowOcclusionTracker to make it a per-Env singleton;
- Expose the tracker API via Window::SetTrackOcclusionState, which
  later will be wired differently based on aura mode. For LOCAL
  aura, it calls tracker in local Env. For MUS aura, the code path
  will be go through WindowTree interface and use the tracker
  in WindowService Env;
- ScopedPauseOcclusionTracking -> ScopedPause since it is a nested
  class and WindowOcclusionTracker::ScopedPause is clear enough;

Bug:  867150 
Change-Id: I73d6e0e0a31dae2e69307b35322fe6501289e889
Reviewed-on: https://chromium-review.googlesource.com/c/1259039
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596916}
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ash/wm/window_dimmer_unittest.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/components/exo/surface_tree_host.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/content/browser/web_contents/web_contents_view_aura.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/env.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/env.h
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/test/window_occlusion_tracker_test_api.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/test/window_occlusion_tracker_test_api.h
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/window.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/window.h
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/aura/window_occlusion_tracker_unittest.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/views/controls/native/native_view_host_aura.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
[modify] https://crrev.com/cb71563fcff798f7eb3faf05cbfaa067bd72277f/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 24

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

commit 4a1a478e225aa97a40ab28b39e98bb975683bc5e
Author: Xiyuan Xia <xiyuan@chromium.org>
Date: Wed Oct 24 23:22:55 2018

ws: Support occlusion state tracking

- Add occlusion state tracking to WindowService;
  - WindowTree::TrackOcclusionState to start tracking in Window Service
    on server side;
  - WindwoTreeClient::OnOcclusionStateChanged to notify the client side
    that the occlusion state is changed on the server side;
- WindowPortMus uses WindowService for occlusion tracking;
- WindowOcclusionTracker allows external window-has-content checking
  and WindowService uses that to mark Windows with remote client
  as has-content;
- Route ScopedPause to WS for MUS aura;

Bug:  867150 
Test: WindowPortMusTest.TrackOcclusionState, WindowTreeClientTest.OcclusionStateFromServer and WindowTreeTest.OcclusionStateChange
Change-Id: Id43a69fb119c602375e8c35d72ead7095eca91d6
Reviewed-on: https://chromium-review.googlesource.com/c/1269717
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602519}
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/content/renderer/mus/renderer_window_tree_client.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/content/renderer/mus/renderer_window_tree_client.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/public/mojom/window_tree.mojom
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/public/mojom/window_tree_constants.mojom
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/test_change_tracker.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/test_change_tracker.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/test_window_tree_client.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/test_window_tree_client.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/window_delegate_impl.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/window_delegate_impl.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/window_service.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/window_tree.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/window_tree.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/services/ws/window_tree_unittest.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/BUILD.gn
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/env.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/env.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/local/window_port_local.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/local/window_port_local.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/property_utils.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/property_utils.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/window_port_mus.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/window_port_mus.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/window_port_mus_unittest.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/window_tree_client.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/mus/window_tree_client_unittest.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/test/mus/test_window_tree.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/test/mus/test_window_tree.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/test/mus/test_window_tree_client_setup.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/test/mus/test_window_tree_client_setup.h
[add] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/test/mus/test_window_tree_delegate.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/test/window_occlusion_tracker_test_api.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/test/window_occlusion_tracker_test_api.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/window.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/window.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/window_occlusion_tracker.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/window_occlusion_tracker.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/window_occlusion_tracker_unittest.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/aura/window_port.h
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/views/controls/native/native_view_host_aura.cc
[modify] https://crrev.com/4a1a478e225aa97a40ab28b39e98bb975683bc5e/ui/views/widget/desktop_aura/desktop_native_widget_aura_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment