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

Unified Diff: ui/display/chromeos/x11/native_display_delegate_x11.cc

Issue 667753002: Treat displays with and without EDID the same way (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/display/chromeos/x11/native_display_delegate_x11.cc
diff --git a/ui/display/chromeos/x11/native_display_delegate_x11.cc b/ui/display/chromeos/x11/native_display_delegate_x11.cc
index 50dc322580bc7e3c400d979f1536aa9b0e80a50d..42d49616fa72fcb189ca72d57e88fc248a7a1169 100644
--- a/ui/display/chromeos/x11/native_display_delegate_x11.cc
+++ b/ui/display/chromeos/x11/native_display_delegate_x11.cc
@@ -308,8 +308,8 @@ DisplaySnapshotX11* NativeDisplayDelegateX11::InitDisplaySnapshot(
RRCrtc* last_used_crtc,
int index) {
int64_t display_id = 0;
- bool has_display_id = GetDisplayId(
- output, static_cast<uint8_t>(index), &display_id);
+ if (!GetDisplayId(output, static_cast<uint8_t>(index), &display_id))
+ display_id = index;
bool has_overscan = false;
GetOutputOverscanFlag(output, &has_overscan);
@@ -318,17 +318,6 @@ DisplaySnapshotX11* NativeDisplayDelegateX11::InitDisplaySnapshot(
if (type == DISPLAY_CONNECTION_TYPE_UNKNOWN)
LOG(ERROR) << "Unknown link type: " << info->name;
- // Use the index as a valid display ID even if the internal
- // display doesn't have valid EDID because the index
- // will never change.
- if (!has_display_id) {
- if (type == DISPLAY_CONNECTION_TYPE_INTERNAL)
- has_display_id = true;
-
- // Fallback to output index.
- display_id = index;
- }
-
RRMode native_mode_id = GetOutputNativeMode(info);
RRMode current_mode_id = None;
gfx::Point origin;
@@ -369,7 +358,6 @@ DisplaySnapshotX11* NativeDisplayDelegateX11::InitDisplaySnapshot(
DisplaySnapshotX11* display_snapshot =
new DisplaySnapshotX11(display_id,
- has_display_id,
origin,
gfx::Size(info->mm_width, info->mm_height),
type,

Powered by Google App Engine
This is Rietveld 408576698