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

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: 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') | ash/display/display_info.cc » ('J')
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..1df63bde4077daa23ac49c71c0b65a5a4fb49cd4 100644
--- a/ash/display/display_change_observer_chromeos.cc
+++ b/ash/display/display_change_observer_chromeos.cc
@@ -191,10 +191,18 @@ void DisplayChangeObserver::OnDisplayModeChanged(
continue;
float device_scale_factor = 1.0f;
- if (!ui::IsDisplaySizeBlackListed(state.display->physical_size())) {
- device_scale_factor =
- FindDeviceScaleFactor((kInchInMm * mode_info->size().width() /
- state.display->physical_size().width()));
+ if (state.display->type() == ui::DISPLAY_CONNECTION_TYPE_INTERNAL) {
+ if (!ui::IsDisplaySizeBlackListed(state.display->physical_size())) {
oshima 2014/08/07 23:03:49 internal display should not be black listed, so we
Jun Mukai 2014/08/08 00:57:33 Done.
+ 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') | ash/display/display_info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698