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

Side by Side Diff: ui/ozone/platform/dri/chromeos/native_display_delegate_dri.cc

Issue 556263005: [Ozone-DRI] Fix blank screen on init (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 | ui/ozone/platform/dri/screen_manager.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 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/chromeos/native_display_delegate_dri.h" 5 #include "ui/ozone/platform/dri/chromeos/native_display_delegate_dri.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "third_party/skia/include/core/SkCanvas.h" 8 #include "third_party/skia/include/core/SkCanvas.h"
9 #include "ui/display/types/chromeos/native_display_observer.h" 9 #include "ui/display/types/chromeos/native_display_observer.h"
10 #include "ui/events/ozone/device/device_event.h" 10 #include "ui/events/ozone/device/device_event.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 } // namespace 72 } // namespace
73 73
74 NativeDisplayDelegateDri::NativeDisplayDelegateDri( 74 NativeDisplayDelegateDri::NativeDisplayDelegateDri(
75 DriWrapper* dri, 75 DriWrapper* dri,
76 ScreenManager* screen_manager, 76 ScreenManager* screen_manager,
77 DeviceManager* device_manager) 77 DeviceManager* device_manager)
78 : dri_(dri), 78 : dri_(dri),
79 screen_manager_(screen_manager), 79 screen_manager_(screen_manager),
80 device_manager_(device_manager) { 80 device_manager_(device_manager) {
81 // TODO(dnicoara): Remove when async display configuration is supported.
82 screen_manager_->ForceInitializationOfPrimaryDisplay();
81 } 83 }
82 84
83 NativeDisplayDelegateDri::~NativeDisplayDelegateDri() { 85 NativeDisplayDelegateDri::~NativeDisplayDelegateDri() {
84 if (device_manager_) 86 if (device_manager_)
85 device_manager_->RemoveObserver(this); 87 device_manager_->RemoveObserver(this);
86 } 88 }
87 89
88 DisplaySnapshot* NativeDisplayDelegateDri::FindDisplaySnapshot(int64_t id) { 90 DisplaySnapshot* NativeDisplayDelegateDri::FindDisplaySnapshot(int64_t id) {
89 for (size_t i = 0; i < cached_displays_.size(); ++i) 91 for (size_t i = 0; i < cached_displays_.size(); ++i)
90 if (cached_displays_[i]->display_id() == id) 92 if (cached_displays_[i]->display_id() == id)
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 old_displays.end(), 322 old_displays.end(),
321 DisplaySnapshotComparator(new_displays[i])); 323 DisplaySnapshotComparator(new_displays[i]));
322 324
323 if (it == old_displays.end()) 325 if (it == old_displays.end())
324 screen_manager_->AddDisplayController(new_displays[i]->crtc(), 326 screen_manager_->AddDisplayController(new_displays[i]->crtc(),
325 new_displays[i]->connector()); 327 new_displays[i]->connector());
326 } 328 }
327 } 329 }
328 330
329 } // namespace ui 331 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/dri/screen_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698