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

Unified Diff: ash/display/display_manager.cc

Issue 455443002: Remember the configured device scale factor for external displays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 4 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 | « ash/display/display_manager.h ('k') | chrome/browser/chromeos/display/display_preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager.cc
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index 2232b8a422d5f18469c98ccbcad57746901deade..6d64f36f3cb52edc65deb311155e45b273cf9991 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -530,6 +530,7 @@ void DisplayManager::RegisterDisplayProperty(
float ui_scale,
const gfx::Insets* overscan_insets,
const gfx::Size& resolution_in_pixels,
+ float device_scale_factor,
ui::ColorCalibrationProfile color_profile) {
if (display_info_.find(display_id) == display_info_.end())
display_info_[display_id] = DisplayInfo(display_id, std::string(), false);
@@ -544,10 +545,12 @@ void DisplayManager::RegisterDisplayProperty(
if (overscan_insets)
display_info_[display_id].SetOverscanInsets(*overscan_insets);
if (!resolution_in_pixels.IsEmpty()) {
+ DCHECK(!IsInternalDisplayId(display_id));
// Default refresh rate, until OnNativeDisplaysChanged() updates us with the
// actual display info, is 60 Hz.
- display_modes_[display_id] =
- DisplayMode(resolution_in_pixels, 60.0f, false, false);
+ DisplayMode mode(resolution_in_pixels, 60.0f, false, false);
+ mode.device_scale_factor = device_scale_factor;
+ display_modes_[display_id] = mode;
}
}
« no previous file with comments | « ash/display/display_manager.h ('k') | chrome/browser/chromeos/display/display_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698