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

Side by Side Diff: ui/ozone/platform/dri/native_display_delegate_proxy.cc

Issue 788423002: Add display task to trigger display configuration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@async-refactor3
Patch Set: Remove include in favour of forward declare Created 6 years 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 | « ui/ozone/platform/dri/native_display_delegate_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/dri/native_display_delegate_proxy.h" 5 #include "ui/ozone/platform/dri/native_display_delegate_proxy.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/display/types/display_snapshot.h" 10 #include "ui/display/types/display_snapshot.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 proxy_->Send(new OzoneGpuMsg_ForceDPMSOn()); 95 proxy_->Send(new OzoneGpuMsg_ForceDPMSOn());
96 } 96 }
97 97
98 std::vector<DisplaySnapshot*> NativeDisplayDelegateProxy::GetDisplays() { 98 std::vector<DisplaySnapshot*> NativeDisplayDelegateProxy::GetDisplays() {
99 // GetDisplays() is supposed to force a refresh of the display list. 99 // GetDisplays() is supposed to force a refresh of the display list.
100 proxy_->Send(new OzoneGpuMsg_RefreshNativeDisplays( 100 proxy_->Send(new OzoneGpuMsg_RefreshNativeDisplays(
101 std::vector<DisplaySnapshot_Params>())); 101 std::vector<DisplaySnapshot_Params>()));
102 return displays_.get(); 102 return displays_.get();
103 } 103 }
104 104
105 void NativeDisplayDelegateProxy::GetDisplays(
106 const GetDisplaysCallback& callback) {
107 callback.Run(GetDisplays());
108 }
109
105 void NativeDisplayDelegateProxy::AddMode(const DisplaySnapshot& output, 110 void NativeDisplayDelegateProxy::AddMode(const DisplaySnapshot& output,
106 const DisplayMode* mode) { 111 const DisplayMode* mode) {
107 } 112 }
108 113
109 bool NativeDisplayDelegateProxy::Configure(const DisplaySnapshot& output, 114 bool NativeDisplayDelegateProxy::Configure(const DisplaySnapshot& output,
110 const DisplayMode* mode, 115 const DisplayMode* mode,
111 const gfx::Point& origin) { 116 const gfx::Point& origin) {
112 // TODO(dnicoara) Should handle an asynchronous response. 117 // TODO(dnicoara) Should handle an asynchronous response.
113 if (mode) 118 if (mode)
114 proxy_->Send(new OzoneGpuMsg_ConfigureNativeDisplay( 119 proxy_->Send(new OzoneGpuMsg_ConfigureNativeDisplay(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 displays_.clear(); 238 displays_.clear();
234 for (size_t i = 0; i < displays.size(); ++i) 239 for (size_t i = 0; i < displays.size(); ++i)
235 displays_.push_back( 240 displays_.push_back(
236 new DriDisplaySnapshotProxy(displays[i], display_manager_)); 241 new DriDisplaySnapshotProxy(displays[i], display_manager_));
237 242
238 FOR_EACH_OBSERVER(NativeDisplayObserver, observers_, 243 FOR_EACH_OBSERVER(NativeDisplayObserver, observers_,
239 OnConfigurationChanged()); 244 OnConfigurationChanged());
240 } 245 }
241 246
242 } // namespace ui 247 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/native_display_delegate_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698