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

Unified Diff: components/exo/wayland/server.cc

Issue 2779823002: exo: Send DSF of internal display to ARC (Closed)
Patch Set: Rebase properly Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/wayland/server.cc
diff --git a/components/exo/wayland/server.cc b/components/exo/wayland/server.cc
index 9b6c097c8ae44bbc154f6376e10dc1ab1dbe43b0..55b76ebff49941c5a746012efcb73b8d180c077e 100644
--- a/components/exo/wayland/server.cc
+++ b/components/exo/wayland/server.cc
@@ -2127,8 +2127,17 @@ class WaylandRemoteShell : public WMHelper::MaximizeModeObserver,
needs_send_display_metrics_ = false;
const display::Screen* screen = display::Screen::GetScreen();
+ display::Display primary_display = screen->GetPrimaryDisplay();
if (IsMultiDisplaySupported()) {
+ // TODO(domlaskowski): Send real DSFs once client selects DPI using DSF.
reveman 2017/03/28 07:12:21 I don't understand this TODO. Can you link to a bu
Dominik Laskowski 2017/03/30 01:21:43 Updated comment.
+ double device_scale_factor =
+ WMHelper::GetInstance()
+ ->GetDisplayInfo(display::Display::HasInternalDisplay()
+ ? display::Display::InternalDisplayId()
+ : primary_display.id())
+ .device_scale_factor();
oshima 2017/03/28 12:46:55 This value may change (as primary display may chan
Dominik Laskowski 2017/03/30 01:21:44 On a device without an internal display, the curso
+
for (const auto& display : screen->GetAllDisplays()) {
const gfx::Rect& bounds = display.bounds();
const gfx::Insets& insets = display.GetWorkAreaInsets();
@@ -2140,13 +2149,12 @@ class WaylandRemoteShell : public WMHelper::MaximizeModeObserver,
bounds.x(), bounds.y(), bounds.width(), bounds.height(),
insets.left(), insets.top(), insets.right(), insets.bottom(),
OutputTransform(display.rotation()),
- wl_fixed_from_double(display.device_scale_factor()));
+ wl_fixed_from_double(device_scale_factor));
}
zcr_remote_shell_v1_send_configure(remote_shell_resource_, layout_mode_);
}
- display::Display primary_display = screen->GetPrimaryDisplay();
const gfx::Insets& insets = primary_display.GetWorkAreaInsets();
zcr_remote_shell_v1_send_configuration_changed(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698