Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Issue 2356913002: Pass device scale factor from display to ws. (Closed)

Created:
4 years, 3 months ago by kylechar
Modified:
4 years, 3 months ago
Reviewers:
rjkroege, sky
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass device scale factor from display to ws in mustash. Pass extra info from PlatfromScreen to it's delegate so that the device bounds in DIP, the pixel size and device scale factor are available. The the delegate happens to be the WS and it will use this information to support high-DPI displays. Most of the changes inside PlatformScreenOzone are throw away. ash::DisplayManager already has this logic. We still have to finish separating ash::DisplayManager from the rest of ash though, necessitating a bit of code duplication until then. The bounds of the display are in DIP. This is the format that is expected from clients that receive the bounds via ScreenMus. The pixel size of the display is needed for creating the PlatformWindow. With this change mustash should run in high-DPI mode when running on a device with a high-DPI internal display. It can also be enabled by specifying the DPI for the fake display in Ozone X11, for example --screen-config=800x800^300 will be high-DPI. BUG=649008 Committed: https://crrev.com/d768e9a95f246bbe36f72244fdc6be15dcc99387 Cr-Commit-Position: refs/heads/master@{#420757}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Address comments. #

Patch Set 3 : Rebase, fix tests and cleanup. #

Total comments: 14

Patch Set 4 : Address more comments. #

Total comments: 2

Patch Set 5 : Move forward def. #

Patch Set 6 : Fix more tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -100 lines) Patch
A + services/ui/display/OWNERS View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
M services/ui/display/platform_screen_delegate.h View 1 2 3 2 chunks +18 lines, -9 lines 0 comments Download
M services/ui/display/platform_screen_ozone.h View 1 2 3 2 chunks +9 lines, -5 lines 0 comments Download
M services/ui/display/platform_screen_ozone.cc View 1 2 3 7 chunks +62 lines, -17 lines 0 comments Download
M services/ui/display/platform_screen_ozone_unittests.cc View 1 2 2 chunks +13 lines, -5 lines 0 comments Download
M services/ui/display/platform_screen_stub.cc View 1 2 2 chunks +11 lines, -1 line 0 comments Download
M services/ui/ws/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/ws/display.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/ws/display.cc View 1 2 chunks +21 lines, -16 lines 0 comments Download
M services/ui/ws/display_manager.h View 1 chunk +8 lines, -2 lines 0 comments Download
M services/ui/ws/display_manager.cc View 1 3 chunks +14 lines, -3 lines 0 comments Download
M services/ui/ws/frame_generator.cc View 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ws/frame_generator_delegate.h View 1 chunk +1 line, -5 lines 0 comments Download
M services/ui/ws/platform_display.h View 1 chunk +3 lines, -1 line 0 comments Download
M services/ui/ws/platform_display.cc View 1 2 3 4 5 4 chunks +23 lines, -15 lines 0 comments Download
M services/ui/ws/platform_display_delegate.h View 1 2 3 4 2 chunks +8 lines, -4 lines 0 comments Download
M services/ui/ws/platform_display_init_params.h View 1 2 1 chunk +2 lines, -9 lines 0 comments Download
M services/ui/ws/platform_display_init_params.cc View 1 2 1 chunk +2 lines, -4 lines 0 comments Download
M services/ui/ws/test_utils.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
A services/ui/ws/viewport_metrics.h View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
M services/ui/ws/window_tree_host_factory.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (19 generated)
kylechar
rjkroege: Let me know what you think of these changes? The stuff outside services/ui/* will ...
4 years, 3 months ago (2016-09-20 20:58:23 UTC) #3
kylechar
rjkroege: Let me know what you think of these changes? The stuff outside services/ui/* will ...
4 years, 3 months ago (2016-09-20 20:58:23 UTC) #4
rjkroege
https://codereview.chromium.org/2356913002/diff/1/services/ui/display/platform_screen_delegate.h File services/ui/display/platform_screen_delegate.h (right): https://codereview.chromium.org/2356913002/diff/1/services/ui/display/platform_screen_delegate.h#newcode26 services/ui/display/platform_screen_delegate.h:26: const gfx::Size& pixel_size, and pixel_size is not in dip? ...
4 years, 3 months ago (2016-09-21 13:23:47 UTC) #5
kylechar
https://codereview.chromium.org/2356913002/diff/1/services/ui/display/platform_screen_delegate.h File services/ui/display/platform_screen_delegate.h (right): https://codereview.chromium.org/2356913002/diff/1/services/ui/display/platform_screen_delegate.h#newcode26 services/ui/display/platform_screen_delegate.h:26: const gfx::Size& pixel_size, On 2016/09/21 13:23:46, rjkroege wrote: > ...
4 years, 3 months ago (2016-09-21 16:31:13 UTC) #6
kylechar
https://codereview.chromium.org/2356913002/diff/1/ui/base/resource/resource_bundle.cc File ui/base/resource/resource_bundle.cc (right): https://codereview.chromium.org/2356913002/diff/1/ui/base/resource/resource_bundle.cc#newcode140 ui/base/resource/resource_bundle.cc:140: // TODO: Remove before submitting. On 2016/09/21 13:23:47, rjkroege ...
4 years, 3 months ago (2016-09-22 20:03:28 UTC) #9
kylechar
+sky for OWNERS review
4 years, 3 months ago (2016-09-22 21:03:11 UTC) #12
sky
Can you also add an OWNERS file for ui/ws/display with you and Rob in it? ...
4 years, 3 months ago (2016-09-22 21:42:07 UTC) #14
kylechar
Done. https://codereview.chromium.org/2356913002/diff/60001/services/ui/display/platform_screen_delegate.h File services/ui/display/platform_screen_delegate.h (right): https://codereview.chromium.org/2356913002/diff/60001/services/ui/display/platform_screen_delegate.h#newcode30 services/ui/display/platform_screen_delegate.h:30: float device_scale_factor) = 0; On 2016/09/22 21:42:06, sky ...
4 years, 3 months ago (2016-09-23 13:22:32 UTC) #15
rjkroege
lgtm (with nit or misreading on my part) https://codereview.chromium.org/2356913002/diff/1/services/ui/display/platform_screen_ozone.cc File services/ui/display/platform_screen_ozone.cc (right): https://codereview.chromium.org/2356913002/diff/1/services/ui/display/platform_screen_ozone.cc#newcode33 services/ui/display/platform_screen_ozone.cc:33: return ...
4 years, 3 months ago (2016-09-23 13:56:23 UTC) #16
kylechar
https://codereview.chromium.org/2356913002/diff/80001/services/ui/ws/platform_display_delegate.h File services/ui/ws/platform_display_delegate.h (right): https://codereview.chromium.org/2356913002/diff/80001/services/ui/ws/platform_display_delegate.h#newcode14 services/ui/ws/platform_display_delegate.h:14: namespace ui { On 2016/09/23 13:56:23, rjkroege wrote: > ...
4 years, 3 months ago (2016-09-23 14:22:28 UTC) #17
rjkroege
On 2016/09/23 14:22:28, kylechar wrote: > https://codereview.chromium.org/2356913002/diff/80001/services/ui/ws/platform_display_delegate.h > File services/ui/ws/platform_display_delegate.h (right): > > https://codereview.chromium.org/2356913002/diff/80001/services/ui/ws/platform_display_delegate.h#newcode14 > ...
4 years, 3 months ago (2016-09-23 16:46:24 UTC) #22
sky
LGTM
4 years, 3 months ago (2016-09-23 17:57:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2356913002/120001
4 years, 3 months ago (2016-09-23 22:21:08 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years, 3 months ago (2016-09-23 22:48:05 UTC) #32
commit-bot: I haz the power
4 years, 3 months ago (2016-09-23 22:50:56 UTC) #34
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/d768e9a95f246bbe36f72244fdc6be15dcc99387
Cr-Commit-Position: refs/heads/master@{#420757}

Powered by Google App Engine
This is Rietveld 408576698