summaryrefslogtreecommitdiffstats
path: root/ash/display/multi_display_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/display/multi_display_manager.cc')
-rw-r--r--ash/display/multi_display_manager.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ash/display/multi_display_manager.cc b/ash/display/multi_display_manager.cc
index 3f1e93d..46f1abc 100644
--- a/ash/display/multi_display_manager.cc
+++ b/ash/display/multi_display_manager.cc
@@ -449,9 +449,10 @@ void MultiDisplayManager::ScaleDisplayImpl() {
iter != displays_.end(); ++iter) {
gfx::Display display = *iter;
float factor = display.device_scale_factor() == 1.0f ? 2.0f : 1.0f;
- display.SetScaleAndBounds(
- factor, gfx::Rect(display.bounds_in_pixel().origin(),
- gfx::ToFlooredSize(display.size().Scale(factor))));
+ gfx::Point display_origin = display.bounds_in_pixel().origin();
+ gfx::Size display_size = gfx::ToFlooredSize(
+ gfx::ScaleSize(display.size(), factor));
+ display.SetScaleAndBounds(factor, gfx::Rect(display_origin, display_size));
new_displays.push_back(display);
}
OnNativeDisplaysChanged(new_displays);