OLD | NEW |
---|---|
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 "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_descriptor_posix.h" | 9 #include "base/file_descriptor_posix.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 auto it = | 219 auto it = |
220 std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path)); | 220 std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path)); |
221 if (it != devices_.end()) { | 221 if (it != devices_.end()) { |
222 LOG(WARNING) << "Got request to add existing device '" << path.value() | 222 LOG(WARNING) << "Got request to add existing device '" << path.value() |
223 << "'"; | 223 << "'"; |
224 return; | 224 return; |
225 } | 225 } |
226 | 226 |
227 scoped_refptr<DriWrapper> device = | 227 scoped_refptr<DriWrapper> device = |
228 drm_device_generator_->CreateDevice(path, file.Pass()); | 228 drm_device_generator_->CreateDevice(path, file.Pass()); |
229 if (!device) { | |
230 LOG(WARNING) << "Could not initialize DRM device for '" << path.value() | |
alexst (slow to review)
2015/02/23 21:46:32
Would this log every time there is a vgem device?
dnicoara
2015/02/23 21:49:10
Yes.
| |
231 << "'"; | |
232 return; | |
233 } | |
234 | |
229 devices_.push_back(device); | 235 devices_.push_back(device); |
230 if (io_task_runner_) | 236 if (io_task_runner_) |
231 device->InitializeTaskRunner(io_task_runner_); | 237 device->InitializeTaskRunner(io_task_runner_); |
232 } | 238 } |
233 | 239 |
234 void NativeDisplayDelegateDri::RemoveGraphicsDevice( | 240 void NativeDisplayDelegateDri::RemoveGraphicsDevice( |
235 const base::FilePath& path) { | 241 const base::FilePath& path) { |
236 auto it = | 242 auto it = |
237 std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path)); | 243 std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path)); |
238 if (it == devices_.end()) { | 244 if (it == devices_.end()) { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
408 | 414 |
409 if (it == old_displays.end()) { | 415 if (it == old_displays.end()) { |
410 screen_manager_->AddDisplayController(new_displays[i]->drm(), | 416 screen_manager_->AddDisplayController(new_displays[i]->drm(), |
411 new_displays[i]->crtc(), | 417 new_displays[i]->crtc(), |
412 new_displays[i]->connector()); | 418 new_displays[i]->connector()); |
413 } | 419 } |
414 } | 420 } |
415 } | 421 } |
416 | 422 |
417 } // namespace ui | 423 } // namespace ui |
OLD | NEW |