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

Side by Side Diff: ui/ozone/platform/drm/host/drm_display_host_manager.cc

Issue 1861593002: chromeos: Turn off displays on suspend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chromeos: Add functions for configuring cached displays Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/ozone/platform/drm/host/drm_display_host_manager.h" 5 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <xf86drm.h> 9 #include <xf86drm.h>
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return; 213 return;
214 } 214 }
215 215
216 relinquish_display_control_callback_ = callback; 216 relinquish_display_control_callback_ = callback;
217 display_control_change_pending_ = true; 217 display_control_change_pending_ = true;
218 218
219 if (!proxy_->GpuRelinquishDisplayControl()) 219 if (!proxy_->GpuRelinquishDisplayControl())
220 GpuRelinquishedDisplayControl(false); 220 GpuRelinquishedDisplayControl(false);
221 } 221 }
222 222
223 void DrmDisplayHostManager::GetCachedDisplays(
224 const GetDisplaysCallback& callback) {
225 RunUpdateDisplaysCallback(callback);
226 }
227
223 void DrmDisplayHostManager::UpdateDisplays( 228 void DrmDisplayHostManager::UpdateDisplays(
224 const GetDisplaysCallback& callback) { 229 const GetDisplaysCallback& callback) {
225 get_displays_callback_ = callback; 230 get_displays_callback_ = callback;
226 if (!proxy_->GpuRefreshNativeDisplays()) { 231 if (!proxy_->GpuRefreshNativeDisplays()) {
227 get_displays_callback_.Reset(); 232 get_displays_callback_.Reset();
228 RunUpdateDisplaysCallback(callback); 233 RunUpdateDisplaysCallback(callback);
229 } 234 }
230 } 235 }
231 236
232 void DrmDisplayHostManager::OnDeviceEvent(const DeviceEvent& event) { 237 void DrmDisplayHostManager::OnDeviceEvent(const DeviceEvent& event) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 463
459 callback.Run(snapshots); 464 callback.Run(snapshots);
460 } 465 }
461 466
462 void DrmDisplayHostManager::NotifyDisplayDelegate() const { 467 void DrmDisplayHostManager::NotifyDisplayDelegate() const {
463 if (delegate_) 468 if (delegate_)
464 delegate_->OnConfigurationChanged(); 469 delegate_->OnConfigurationChanged();
465 } 470 }
466 471
467 } // namespace ui 472 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_display_host_manager.h ('k') | ui/ozone/platform/drm/host/drm_native_display_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698