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

Unified Diff: ui/ozone/platform/dri/gbm_wrapper.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: Make errors/warning to vlogs 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/gbm_wrapper.h ('k') | ui/ozone/platform/dri/hardware_display_plane_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/gbm_wrapper.cc
diff --git a/ui/ozone/platform/dri/gbm_wrapper.cc b/ui/ozone/platform/dri/gbm_wrapper.cc
index e75cc58a33587b530d05d9e2e219f9cc78c173d9..e0d1f17ddc623ce8f8839caa95637838751d841b 100644
--- a/ui/ozone/platform/dri/gbm_wrapper.cc
+++ b/ui/ozone/platform/dri/gbm_wrapper.cc
@@ -21,11 +21,17 @@ GbmWrapper::~GbmWrapper() {
gbm_device_destroy(device_);
}
-void GbmWrapper::Initialize() {
- DriWrapper::Initialize();
+bool GbmWrapper::Initialize() {
+ if (!DriWrapper::Initialize())
+ return false;
+
device_ = gbm_create_device(get_fd());
- if (!device_)
- LOG(FATAL) << "Unable to initialize GBM";
+ if (!device_) {
+ LOG(ERROR) << "Unable to initialize GBM";
+ return false;
+ }
+
+ return true;
}
} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/gbm_wrapper.h ('k') | ui/ozone/platform/dri/hardware_display_plane_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698