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

Unified Diff: ui/ozone/platform/dri/native_display_delegate_dri.cc

Issue 947293002: [Ozone-Dri] Gracefully handle DRM devices with no resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/dri/native_display_delegate_dri.cc
diff --git a/ui/ozone/platform/dri/native_display_delegate_dri.cc b/ui/ozone/platform/dri/native_display_delegate_dri.cc
index b242283a88b8b8d0e420d9a1c0b0fa1199c37556..a5776f4781e3545e80aeab27509fc64c81c0544c 100644
--- a/ui/ozone/platform/dri/native_display_delegate_dri.cc
+++ b/ui/ozone/platform/dri/native_display_delegate_dri.cc
@@ -226,6 +226,12 @@ void NativeDisplayDelegateDri::AddGraphicsDevice(
scoped_refptr<DriWrapper> device =
drm_device_generator_->CreateDevice(path, file.Pass());
+ if (!device) {
+ 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.
+ << "'";
+ return;
+ }
+
devices_.push_back(device);
if (io_task_runner_)
device->InitializeTaskRunner(io_task_runner_);

Powered by Google App Engine
This is Rietveld 408576698