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

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

Issue 956563004: [Ozone-Dri] Gracefully handle DRM devices with no resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
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
« no previous file with comments | « ui/ozone/platform/dri/dri_wrapper.cc ('k') | ui/ozone/platform/dri/gbm_wrapper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/drm_device_generator.cc
diff --git a/ui/ozone/platform/dri/drm_device_generator.cc b/ui/ozone/platform/dri/drm_device_generator.cc
index 7b4a568eeda6774551859fc98e047dca331ab98f..13985db458abc5c3161eb3a0471b3d7604fe2731 100644
--- a/ui/ozone/platform/dri/drm_device_generator.cc
+++ b/ui/ozone/platform/dri/drm_device_generator.cc
@@ -18,8 +18,10 @@ scoped_refptr<DriWrapper> DrmDeviceGenerator::CreateDevice(
const base::FilePath& device_path,
base::File file) {
scoped_refptr<DriWrapper> drm = new DriWrapper(device_path, file.Pass());
- drm->Initialize();
- return drm;
+ if (drm->Initialize())
+ return drm;
+
+ return nullptr;
}
} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/dri_wrapper.cc ('k') | ui/ozone/platform/dri/gbm_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698