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

Side by Side Diff: components/exo/wayland/server.cc

Issue 2779823002: exo: Send DSF of internal display to ARC (Closed)
Patch Set: Send is_internal flag instead Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/exo/wayland/server.h" 5 #include "components/exo/wayland/server.h"
6 6
7 #include <alpha-compositing-unstable-v1-server-protocol.h> 7 #include <alpha-compositing-unstable-v1-server-protocol.h>
8 #include <gaming-input-unstable-v1-server-protocol.h> 8 #include <gaming-input-unstable-v1-server-protocol.h>
9 #include <gaming-input-unstable-v2-server-protocol.h> 9 #include <gaming-input-unstable-v2-server-protocol.h>
10 #include <grp.h> 10 #include <grp.h>
(...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 return; 2171 return;
2172 needs_send_display_metrics_ = false; 2172 needs_send_display_metrics_ = false;
2173 2173
2174 const display::Screen* screen = display::Screen::GetScreen(); 2174 const display::Screen* screen = display::Screen::GetScreen();
2175 2175
2176 if (IsMultiDisplaySupported()) { 2176 if (IsMultiDisplaySupported()) {
2177 for (const auto& display : screen->GetAllDisplays()) { 2177 for (const auto& display : screen->GetAllDisplays()) {
2178 const gfx::Rect& bounds = display.bounds(); 2178 const gfx::Rect& bounds = display.bounds();
2179 const gfx::Insets& insets = display.GetWorkAreaInsets(); 2179 const gfx::Insets& insets = display.GetWorkAreaInsets();
2180 2180
2181 double device_scale_factor =
2182 WMHelper::GetInstance()->GetDisplayInfo(display.id())
2183 .device_scale_factor();
2184
2181 zcr_remote_shell_v1_send_workspace( 2185 zcr_remote_shell_v1_send_workspace(
2182 remote_shell_resource_, 2186 remote_shell_resource_,
2183 static_cast<uint32_t>(display.id() >> 32), 2187 static_cast<uint32_t>(display.id() >> 32),
2184 static_cast<uint32_t>(display.id()), 2188 static_cast<uint32_t>(display.id()),
2185 bounds.x(), bounds.y(), bounds.width(), bounds.height(), 2189 bounds.x(), bounds.y(), bounds.width(), bounds.height(),
2186 insets.left(), insets.top(), insets.right(), insets.bottom(), 2190 insets.left(), insets.top(), insets.right(), insets.bottom(),
2187 OutputTransform(display.rotation()), 2191 OutputTransform(display.rotation()),
2188 wl_fixed_from_double(display.device_scale_factor())); 2192 wl_fixed_from_double(device_scale_factor),
2193 display.IsInternal());
2189 } 2194 }
2190 2195
2191 zcr_remote_shell_v1_send_configure(remote_shell_resource_, layout_mode_); 2196 zcr_remote_shell_v1_send_configure(remote_shell_resource_, layout_mode_);
2192 } 2197 }
2193 2198
2194 display::Display primary_display = screen->GetPrimaryDisplay(); 2199 display::Display primary_display = screen->GetPrimaryDisplay();
2195 const gfx::Insets& insets = primary_display.GetWorkAreaInsets(); 2200 const gfx::Insets& insets = primary_display.GetWorkAreaInsets();
2196 2201
2197 zcr_remote_shell_v1_send_configuration_changed( 2202 zcr_remote_shell_v1_send_configuration_changed(
2198 remote_shell_resource_, 2203 remote_shell_resource_,
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
3953 DCHECK(event_loop); 3958 DCHECK(event_loop);
3954 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); 3959 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds());
3955 } 3960 }
3956 3961
3957 void Server::Flush() { 3962 void Server::Flush() {
3958 wl_display_flush_clients(wl_display_.get()); 3963 wl_display_flush_clients(wl_display_.get());
3959 } 3964 }
3960 3965
3961 } // namespace wayland 3966 } // namespace wayland
3962 } // namespace exo 3967 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698