From 78c352ade4b70c53475270d57c85c51d7fc08671 Mon Sep 17 00:00:00 2001 From: "girard@chromium.org" Date: Tue, 24 Dec 2013 15:09:02 +0000 Subject: Correct the operation of the --high-dpi-support=1 flag under win/ash. BUG=319941 Review URL: https://codereview.chromium.org/59213007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242430 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/display/display_info.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ash') diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc index 01c604f..4ee73c0 100644 --- a/ash/display/display_info.cc +++ b/ash/display/display_info.cc @@ -17,6 +17,7 @@ #if defined(OS_WIN) #include "ui/aura/window_tree_host.h" +#include "ui/gfx/win/dpi.h" #endif namespace ash { @@ -95,6 +96,12 @@ DisplayInfo DisplayInfo::CreateFromSpecWithID(const std::string& spec, sscanf(main_spec.c_str(), "%d+%d-%dx%d*%f", &x, &y, &width, &height, &device_scale_factor) >= 4) { bounds_in_native.SetRect(x, y, width, height); + } else { +#if defined(OS_WIN) + if (gfx::IsHighDPIEnabled()) { + device_scale_factor = gfx::GetModernUIScale(); + } +#endif } std::vector resolutions; -- cgit v1.1