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

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

Issue 913273006: ozone: choose a card useful for display rather than by default (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/dri_wrapper.cc
diff --git a/ui/ozone/platform/dri/dri_wrapper.cc b/ui/ozone/platform/dri/dri_wrapper.cc
index a55a3dfffec5afe9daa2f225d9952f5fab72d513..1dcd95b06eadf50fb40c93f7fab43f64e8ba0eb7 100644
--- a/ui/ozone/platform/dri/dri_wrapper.cc
+++ b/ui/ozone/platform/dri/dri_wrapper.cc
@@ -158,7 +158,10 @@ DriWrapper::~DriWrapper() {
}
void DriWrapper::Initialize() {
- fd_ = open(device_path_, O_RDWR | O_CLOEXEC);
+ if (device_path_ == NULL)
+ fd_ = OpenFirstDisplayCard();
+ else
+ fd_ = open(device_path_, O_RDWR | O_CLOEXEC);
if (fd_ < 0)
PLOG(FATAL) << "open: " << device_path_;
if (!plane_manager_->Initialize(this))

Powered by Google App Engine
This is Rietveld 408576698