From 9de0a1096ca6e5984f87b7bda3ed131aea4e0d95 Mon Sep 17 00:00:00 2001 From: "flackr@chromium.org" Date: Tue, 6 Aug 2013 21:52:14 +0000 Subject: Ignore dpi scaling if not in dpi mode. BUG=265766 R=sadrul@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/22381005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215988 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/base/win/dpi.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ui/base/win') diff --git a/ui/base/win/dpi.cc b/ui/base/win/dpi.cc index 049a990..6380459 100644 --- a/ui/base/win/dpi.cc +++ b/ui/base/win/dpi.cc @@ -76,8 +76,11 @@ gfx::Size GetDPI() { } float GetDPIScale() { - return static_cast(GetDPI().width()) / - static_cast(kDefaultDPIX); + if (IsHighDPIEnabled()) { + return static_cast(GetDPI().width()) / + static_cast(kDefaultDPIX); + } + return 1.0; } bool IsInHighDPIMode() { -- cgit v1.1