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

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

Issue 2779823002: exo: Send DSF of internal display to ARC (Closed)
Patch Set: Document is_internal Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 return; 2178 return;
2179 needs_send_display_metrics_ = false; 2179 needs_send_display_metrics_ = false;
2180 2180
2181 const display::Screen* screen = display::Screen::GetScreen(); 2181 const display::Screen* screen = display::Screen::GetScreen();
2182 2182
2183 if (IsMultiDisplaySupported()) { 2183 if (IsMultiDisplaySupported()) {
2184 for (const auto& display : screen->GetAllDisplays()) { 2184 for (const auto& display : screen->GetAllDisplays()) {
2185 const gfx::Rect& bounds = display.bounds(); 2185 const gfx::Rect& bounds = display.bounds();
2186 const gfx::Insets& insets = display.GetWorkAreaInsets(); 2186 const gfx::Insets& insets = display.GetWorkAreaInsets();
2187 2187
2188 double device_scale_factor =
2189 WMHelper::GetInstance()->GetDisplayInfo(display.id())
2190 .device_scale_factor();
2191
2188 zcr_remote_shell_v1_send_workspace( 2192 zcr_remote_shell_v1_send_workspace(
2189 remote_shell_resource_, 2193 remote_shell_resource_,
2190 static_cast<uint32_t>(display.id() >> 32), 2194 static_cast<uint32_t>(display.id() >> 32),
2191 static_cast<uint32_t>(display.id()), 2195 static_cast<uint32_t>(display.id()),
2192 bounds.x(), bounds.y(), bounds.width(), bounds.height(), 2196 bounds.x(), bounds.y(), bounds.width(), bounds.height(),
2193 insets.left(), insets.top(), insets.right(), insets.bottom(), 2197 insets.left(), insets.top(), insets.right(), insets.bottom(),
2194 OutputTransform(display.rotation()), 2198 OutputTransform(display.rotation()),
2195 wl_fixed_from_double(display.device_scale_factor())); 2199 wl_fixed_from_double(device_scale_factor),
2200 display.IsInternal());
2196 } 2201 }
2197 2202
2198 zcr_remote_shell_v1_send_configure(remote_shell_resource_, layout_mode_); 2203 zcr_remote_shell_v1_send_configure(remote_shell_resource_, layout_mode_);
2199 } 2204 }
2200 2205
2201 display::Display primary_display = screen->GetPrimaryDisplay(); 2206 display::Display primary_display = screen->GetPrimaryDisplay();
2202 const gfx::Insets& insets = primary_display.GetWorkAreaInsets(); 2207 const gfx::Insets& insets = primary_display.GetWorkAreaInsets();
2203 2208
2204 zcr_remote_shell_v1_send_configuration_changed( 2209 zcr_remote_shell_v1_send_configuration_changed(
2205 remote_shell_resource_, 2210 remote_shell_resource_,
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
4043 DCHECK(event_loop); 4048 DCHECK(event_loop);
4044 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds()); 4049 wl_event_loop_dispatch(event_loop, timeout.InMilliseconds());
4045 } 4050 }
4046 4051
4047 void Server::Flush() { 4052 void Server::Flush() {
4048 wl_display_flush_clients(wl_display_.get()); 4053 wl_display_flush_clients(wl_display_.get());
4049 } 4054 }
4050 4055
4051 } // namespace wayland 4056 } // namespace wayland
4052 } // namespace exo 4057 } // namespace exo
OLDNEW
« no previous file with comments | « no previous file | third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698