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

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: 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
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..ba5d2aed35cdf3002f0bf30eb3e6266f9cf28e45 100644
--- a/ui/ozone/platform/dri/native_display_delegate_dri.cc
+++ b/ui/ozone/platform/dri/native_display_delegate_dri.cc
@@ -219,13 +219,17 @@ void NativeDisplayDelegateDri::AddGraphicsDevice(
auto it =
std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path));
if (it != devices_.end()) {
- LOG(WARNING) << "Got request to add existing device '" << path.value()
- << "'";
+ VLOG(2) << "Got request to add existing device '" << path.value() << "'";
return;
}
scoped_refptr<DriWrapper> device =
drm_device_generator_->CreateDevice(path, file.Pass());
+ if (!device) {
+ VLOG(2) << "Could not initialize DRM device for '" << path.value() << "'";
+ return;
+ }
+
devices_.push_back(device);
if (io_task_runner_)
device->InitializeTaskRunner(io_task_runner_);
@@ -236,8 +240,8 @@ void NativeDisplayDelegateDri::RemoveGraphicsDevice(
auto it =
std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path));
if (it == devices_.end()) {
- LOG(ERROR) << "Got request to remove non-existent device '" << path.value()
- << "'";
+ VLOG(2) << "Got request to remove non-existent device '" << path.value()
+ << "'";
return;
}
« no previous file with comments | « ui/ozone/platform/dri/hardware_display_plane_manager.cc ('k') | ui/ozone/platform/dri/ozone_platform_dri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698