Index: ash/display/display_change_observer_chromeos.cc |
diff --git a/ash/display/display_change_observer_chromeos.cc b/ash/display/display_change_observer_chromeos.cc |
index cc30d1fd2926ef3c3d977c7dd20d8110ef44be26..f25a59e0b16f1e739dbb337661edecf25a82d679 100644 |
--- a/ash/display/display_change_observer_chromeos.cc |
+++ b/ash/display/display_change_observer_chromeos.cc |
@@ -136,6 +136,22 @@ std::vector<DisplayMode> DisplayChangeObserver::GetExternalDisplayModeList( |
display_mode_list.push_back(iter->second); |
} |
+ if (output.display->native_mode()) { |
+ const ui::DisplayMode& native_mode = *output.display->native_mode(); |
+ const std::pair<int, int> size(native_mode.size().width(), |
+ native_mode.size().height()); |
+ DisplayModeMap::iterator it = display_mode_map.find(size); |
+ DCHECK(it != display_mode_map.end()) |
+ << "Native mode must be part of the mode list."; |
+ |
+ // If the native mode wasn't added or was replaced re-add it. |
+ if (!it->second.native) |
+ display_mode_list.push_back(DisplayMode(native_mode.size(), |
Jun Mukai
2014/10/08 19:41:53
why not simply pushing |native_mode| here?
dnicoara
2014/10/08 19:50:43
Arr, right, sorry, completely missed that it was t
|
+ native_mode.refresh_rate(), |
+ native_mode.is_interlaced(), |
+ true)); |
+ } |
+ |
if (native_mode.size.width() >= kMinimumWidthFor4K) { |
for (size_t i = 0; i < arraysize(kAdditionalDeviceScaleFactorsFor4k); |
++i) { |