New issue
Advanced search Search tips

Issue 641012 link

Starred by 1 user

Issue metadata

Status: Fixed
Merged: issue 581462
Owner:
Closed: Oct 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature

Blocking:
issue 581462



Sign in to add a comment

Mus supports adding/removing/modified displays

Project Member Reported by kylec...@chromium.org, Aug 25 2016

Issue description

The mus-ws should support adding new displays, removing displays and displays being modified (for example resolution, origin or other bits being changed).

This means that ws must be able to modify the root ServerWindows and associated state appropriately in response to display changes.
 
Labels: -Type-Bug Type-Feature
Blocking: -625876
Mergedinto: 581462
Status: Duplicate (was: Started)
This already exists. Whoops.
Blocking: 581462
Status: Started (was: Duplicate)
Nevermind, that bug is broader in scope. This is a portion of full multiple display support.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 26 2016

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

commit 5ea85f775041eb6ccb4813bdf91e1672f829c577
Author: kylechar <kylechar@chromium.org>
Date: Fri Aug 26 14:48:15 2016

Add PlatformScreenDelegate and start implementation.

There is currently a single callback provided to PlatformScreen for when
new displays are added. We need to be able to notify not only when new
displays are added but also when displays are modified or removed.
Instead of having three callbacks, the PlatformScreenDelegate interface
is added.

The ui::ws::DisplayManager class implements PlatformScreenDelegate. This
is ultimately the class that needs to know about changes to displays so
it can update root windows accordingly.

There are some changes to ownership and constructor parameters to
facilitate having DisplayManager implement PlatformScreenDelegate. The
WindowServer instance is passed into DisplayManager, as it doesn't make
sense that Display objects owned by DisplayManager are allowed to know
about WindowServer but DisplayManager is not. The DisplayManagerDelegate
interface is simplified and changed to UserDisplayManagerDelegate as
it's no longer needed for DisplayManager.

The instantiation of SurfaceState is moved from Service to WindowServer.
There is no need to have Service know about SurfaceState anymore. Also,
SurfaceState will be moving to the GPU processes regardless.

BUG= 641012 

Review-Url: https://codereview.chromium.org/2274353003
Cr-Commit-Position: refs/heads/master@{#414710}

[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/display/BUILD.gn
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/display/platform_screen.h
[add] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/display/platform_screen_delegate.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/display/platform_screen_impl.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/display/platform_screen_impl.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/display/platform_screen_impl_ozone.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/display/platform_screen_impl_ozone.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/service.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/service.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/BUILD.gn
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/cursor_unittest.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/display_manager.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/display_manager.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/display_unittest.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/test_utils.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/test_utils.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/user_display_manager.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/user_display_manager.h
[rename] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/user_display_manager_delegate.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/user_display_manager_unittest.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/window_server.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/window_server.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/window_server_delegate.h
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/window_tree_host_factory.cc
[modify] https://crrev.com/5ea85f775041eb6ccb4813bdf91e1672f829c577/services/ui/ws/window_tree_host_factory.h

Components: MUS
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 6 2016

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

commit 80f206eec2f4ba6ec5485d6a40ac5a9af968ab38
Author: kylechar <kylechar@chromium.org>
Date: Tue Sep 06 17:50:26 2016

Process DisplaySnapshots in PlatformScreen.

Add logic to process DisplaySnapshots from the DisplayConfigurator.
Process the contents of the snapshots to find new, removed or modified
displays.

Add unit tests to test that the correct calls are made to the
PlatformScreenDelegate in response to receiving an updated list of
display snapshots.

BUG= 641012 

Review-Url: https://codereview.chromium.org/2297743002
Cr-Commit-Position: refs/heads/master@{#416657}

[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/services/ui/display/BUILD.gn
[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/services/ui/display/platform_screen_impl_ozone.cc
[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/services/ui/display/platform_screen_impl_ozone.h
[add] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/services/ui/display/platform_screen_ozone_unittests.cc
[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/services/ui/ws/display_manager.cc
[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/services/ui/ws/display_manager.h
[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/testing/buildbot/chromium.chromiumos.json
[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/testing/buildbot/gn_isolate_map.pyl
[modify] https://crrev.com/80f206eec2f4ba6ec5485d6a40ac5a9af968ab38/ui/display/chromeos/display_snapshot_virtual.h

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 13 2016

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

commit ff1f2f190b17b41e787f89f6825d6cc3bbd10bec
Author: kylechar <kylechar@chromium.org>
Date: Tue Sep 13 14:36:43 2016

Fix adding displays in mustash.

This CL fixes two bugs that occured when adding displays after the
initial display setup.

The first bug is caused by Display::OnViewportMetricsChanged() getting
called before the WindowManagerDisplayRoot for the display is created.
ScreenMus receives a message that a display has been added before the
WindowTreeClient was updated. When ash looked for the root window
controller corresponding to the display it didn't exist yet. Fix by not
calling OnDisplayUpdated() if the ui::ws::Display hasn't been
initialized yet and explicitly call it after WindowManagerDisplayRoot(s)
have been created.

The second bug was not initializing the GPU channel for displays after
the first display.

BUG= 641012 

Review-Url: https://codereview.chromium.org/2330093003
Cr-Commit-Position: refs/heads/master@{#418242}

[modify] https://crrev.com/ff1f2f190b17b41e787f89f6825d6cc3bbd10bec/services/ui/ws/display.cc
[modify] https://crrev.com/ff1f2f190b17b41e787f89f6825d6cc3bbd10bec/services/ui/ws/display_manager.cc

Components: -MUS
Labels: mustash-display
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 19 2016

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

commit 0f1a2fab593f627a168e95b1cfec1b241c129133
Author: kylechar <kylechar@chromium.org>
Date: Mon Sep 19 21:36:54 2016

Unify mustash display closing code paths.

There are currently two ways a display can be closed in mustash. First,
the NDD can update and indicated the display is gone. Second, when
running off device the user can close the platform window. This CL
unifies the two code paths.

When running off device and the platform window calls
PlatformWindowDelegate::OnRequestClose() the request is forwarded to
PlatformScreen. PlatformScreen then tells the NDD to remove the fake
display. The display configuration will update and the display will be
gone. This allows the same display removed code path to get used in all
cases.

This also fixes PlatformScreen not knowing about the user closing a
display.

BUG= 641012 

Review-Url: https://codereview.chromium.org/2345043003
Cr-Commit-Position: refs/heads/master@{#419563}

[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/display/platform_screen.h
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/display/platform_screen_ozone.cc
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/display/platform_screen_ozone.h
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/display/platform_screen_stub.cc
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/display/platform_screen_stub.h
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/ws/display.cc
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/ws/display.h
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/ws/display_manager.cc
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/ws/platform_display.cc
[modify] https://crrev.com/0f1a2fab593f627a168e95b1cfec1b241c129133/services/ui/ws/platform_display_delegate.h

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 21 2016

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

commit a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4
Author: kylechar <kylechar@chromium.org>
Date: Fri Oct 21 17:35:04 2016

Handle modified displays in mustash.

Big CL that fixes many small things related to display information being
propagated when a display is modified. The primary change is that
ws::DisplayManager now handles OnDisplayModified() calls. This entails
the following steps:

1. The PlatformDisplay corresponding to the display is updated.
2. Mus sends an IPC to WM clients telling them the display has changed.
   This requires a new message in mojom::WindowManager and new method in
   WindowManagerDelegate.
3. Update the root ServerWindow for the display.
4. Mus sends an IPC to any other clients telling them the display has
   changed.

The ViewportMetrics class is moved from src/services/ui/ws/ to
src/services/ui/display so that it can be used in
PlatformScreenDelegate.

PlatformScreen now implements ui::DisplayController::StateController so
it can pick the display size.  A message is added to
mojom::TestDisplayController to trigger changing the display size. This
allows developers to try the functionality. An unused ash developer
keyboard shortcut is used to trigger changing the display size. This
shortcut is only temporary until settings are working.

Another small part of this change is the display insets are sent from
ash to PlatformScreen. This is tangentially related as it relies on
DisplayManager::OnDisplayModified() working.

BUG= 641012 

Review-Url: https://chromiumcodereview.appspot.com/2434923002
Cr-Commit-Position: refs/heads/master@{#426830}

[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ash/mus/accelerators/accelerator_controller_delegate_mus.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ash/mus/accelerators/accelerator_controller_delegate_mus.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ash/mus/bridge/wm_shell_mus.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ash/mus/root_window_controller.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ash/mus/root_window_controller.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ash/mus/window_manager.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ash/mus/window_manager.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/demo/mus_demo.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/demo/mus_demo.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/BUILD.gn
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/platform_screen_delegate.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/platform_screen_ozone.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/platform_screen_ozone.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/platform_screen_ozone_unittests.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/platform_screen_stub.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/platform_screen_stub.h
[add] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/viewport_metrics.cc
[add] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/display/viewport_metrics.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/public/cpp/tests/window_server_test_base.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/public/cpp/tests/window_server_test_base.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/public/cpp/window_manager_delegate.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/public/cpp/window_tree_client.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/public/cpp/window_tree_client.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/public/interfaces/display/test_display_controller.mojom
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/public/interfaces/window_manager.mojom
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/test_wm/test_wm.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/BUILD.gn
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/display.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/display.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/display_manager.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/display_manager.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/frame_generator.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/frame_generator_delegate.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/platform_display.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/platform_display.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/platform_display_delegate.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/platform_display_init_params.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/test_utils.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/test_utils.h
[delete] https://crrev.com/8a9b43fb69ae9e0ad04fa0d51a6148e343ae56a4/services/ui/ws/viewport_metrics.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/window_manager_client_unittest.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/window_tree.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/window_tree.h
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/services/ui/ws/window_tree_client_unittest.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ui/display/display_list.cc
[modify] https://crrev.com/a06c6ea472e2ea1bf14fd34eb1092c7ef30bbdd4/ui/display/display_list.h

Status: Fixed (was: Started)

Sign in to add a comment