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

Unified Diff: ui/display/chromeos/display_configurator.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
« no previous file with comments | « no previous file | ui/display/chromeos/display_configurator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/chromeos/display_configurator.cc
diff --git a/ui/display/chromeos/display_configurator.cc b/ui/display/chromeos/display_configurator.cc
index 3194636b6279e587c57dae75ef662c0f8e2c7e14..03a63d053483e7bf8db4842e0b74c030da0c21f9 100644
--- a/ui/display/chromeos/display_configurator.cc
+++ b/ui/display/chromeos/display_configurator.cc
@@ -579,15 +579,14 @@ void DisplayConfigurator::UpdateCachedDisplays() {
// Set |selected_mode| fields.
for (size_t i = 0; i < cached_displays_.size(); ++i) {
DisplayState* display_state = &cached_displays_[i];
- if (display_state->display->has_proper_display_id()) {
- gfx::Size size;
- if (state_controller_ &&
- state_controller_->GetResolutionForDisplayId(
- display_state->display->display_id(), &size)) {
- display_state->selected_mode =
- FindDisplayModeMatchingSize(*display_state->display, size);
- }
+ gfx::Size size;
+ if (state_controller_ &&
+ state_controller_->GetResolutionForDisplayId(
+ display_state->display->display_id(), &size)) {
+ display_state->selected_mode =
+ FindDisplayModeMatchingSize(*display_state->display, size);
}
+
// Fall back to native mode.
if (!display_state->selected_mode)
display_state->selected_mode = display_state->display->native_mode();
@@ -960,12 +959,9 @@ MultipleDisplayState DisplayConfigurator::ChooseDisplayState(
// With either both displays on or both displays off, use one of the
// dual modes.
std::vector<int64_t> display_ids;
- for (size_t i = 0; i < cached_displays_.size(); ++i) {
- // If display id isn't available, switch to extended mode.
- if (!cached_displays_[i].display->has_proper_display_id())
- return MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED;
+ for (size_t i = 0; i < cached_displays_.size(); ++i)
display_ids.push_back(cached_displays_[i].display->display_id());
- }
+
return state_controller_->GetStateForDisplayIds(display_ids);
}
}
« no previous file with comments | « no previous file | ui/display/chromeos/display_configurator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698