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

Side by Side Diff: ui/ozone/platform/dri/native_display_delegate_dri.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
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_dri.h" 5 #include "ui/ozone/platform/dri/native_display_delegate_dri.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ui/display/types/native_display_observer.h" 8 #include "ui/display/types/native_display_observer.h"
9 #include "ui/events/ozone/device/device_event.h" 9 #include "ui/events/ozone/device/device_event.h"
10 #include "ui/ozone/platform/dri/display_mode_dri.h" 10 #include "ui/ozone/platform/dri/display_mode_dri.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 display->modes().end()); 155 display->modes().end());
156 } 156 }
157 157
158 NotifyScreenManager(cached_displays_.get(), old_displays.get()); 158 NotifyScreenManager(cached_displays_.get(), old_displays.get());
159 159
160 std::vector<DisplaySnapshot*> generic_displays(cached_displays_.begin(), 160 std::vector<DisplaySnapshot*> generic_displays(cached_displays_.begin(),
161 cached_displays_.end()); 161 cached_displays_.end());
162 return generic_displays; 162 return generic_displays;
163 } 163 }
164 164
165 void NativeDisplayDelegateDri::GetDisplays(
166 const GetDisplaysCallback& callback) {
167 callback.Run(GetDisplays());
168 }
169
165 void NativeDisplayDelegateDri::AddMode(const DisplaySnapshot& output, 170 void NativeDisplayDelegateDri::AddMode(const DisplaySnapshot& output,
166 const DisplayMode* mode) { 171 const DisplayMode* mode) {
167 } 172 }
168 173
169 bool NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output, 174 bool NativeDisplayDelegateDri::Configure(const DisplaySnapshot& output,
170 const DisplayMode* mode, 175 const DisplayMode* mode,
171 const gfx::Point& origin) { 176 const gfx::Point& origin) {
172 const DisplaySnapshotDri& dri_output = 177 const DisplaySnapshotDri& dri_output =
173 static_cast<const DisplaySnapshotDri&>(output); 178 static_cast<const DisplaySnapshotDri&>(output);
174 179
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 std::find_if(old_displays.begin(), old_displays.end(), 307 std::find_if(old_displays.begin(), old_displays.end(),
303 DisplaySnapshotComparator(new_displays[i])); 308 DisplaySnapshotComparator(new_displays[i]));
304 309
305 if (it == old_displays.end()) 310 if (it == old_displays.end())
306 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(), 311 screen_manager_->AddDisplayController(dri_, new_displays[i]->crtc(),
307 new_displays[i]->connector()); 312 new_displays[i]->connector());
308 } 313 }
309 } 314 }
310 315
311 } // namespace ui 316 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/native_display_delegate_dri.h ('k') | ui/ozone/platform/dri/native_display_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698