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

Unified Diff: ash/display/display_change_observer_chromeos.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 | « no previous file | ash/display/display_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63cc33a7152ee641d363a0c6c59b5b04d57dc273..2634622b3de7537cd6db1a19a0f18035361ae51e 100644
--- a/ash/display/display_change_observer_chromeos.cc
+++ b/ash/display/display_change_observer_chromeos.cc
@@ -191,10 +191,16 @@ void DisplayChangeObserver::OnDisplayModeChanged(
continue;
float device_scale_factor = 1.0f;
- if (!ui::IsDisplaySizeBlackListed(state.display->physical_size())) {
+ if (state.display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) {
device_scale_factor =
FindDeviceScaleFactor((kInchInMm * mode_info->size().width() /
state.display->physical_size().width()));
+ } else {
+ DisplayMode mode;
+ if (Shell::GetInstance()->display_manager()->GetSelectedModeForDisplayId(
+ state.display->display_id(), &mode)) {
+ device_scale_factor = mode.device_scale_factor;
+ }
}
gfx::Rect display_bounds(state.display->origin(), mode_info->size());
« no previous file with comments | « no previous file | ash/display/display_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698