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

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

Issue 854203002: Read EDID for the 1st display for startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_proxy.cc
diff --git a/ui/ozone/platform/dri/native_display_delegate_proxy.cc b/ui/ozone/platform/dri/native_display_delegate_proxy.cc
index 29dc53805c62c6218fc9bb638bcf6360b65f6080..c1bc44c98f7f44e1ea44ae41f6a48bd396dcdef0 100644
--- a/ui/ozone/platform/dri/native_display_delegate_proxy.cc
+++ b/ui/ozone/platform/dri/native_display_delegate_proxy.cc
@@ -63,9 +63,13 @@ void NativeDisplayDelegateProxy::Initialize() {
if (!displays_.empty())
return;
-
- DisplaySnapshot_Params params = CreateSnapshotFromCommandLine();
- if (params.type != DISPLAY_CONNECTION_TYPE_NONE) {
+ // The file generated by frecon that contains EDID for the 1st display.
+ const base::FilePath kEDIDFile("/tmp/display_info.bin");
+ DisplaySnapshot_Params params;
+ // Fallback to command line if the file doesn't exit or failed to read.
+ if (CreateSnapshotFromEDIDFile(kEDIDFile, &params) ||
+ CreateSnapshotFromCommandLine(&params)) {
+ DCHECK_NE(DISPLAY_CONNECTION_TYPE_NONE, params.type);
displays_.push_back(new DriDisplaySnapshotProxy(params, display_manager_));
has_dummy_display_ = true;
}
« ui/ozone/common/display_util.cc ('K') | « ui/ozone/platform/dri/display_snapshot_dri.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698