summaryrefslogtreecommitdiffstats
path: root/ui/base/win
diff options
context:
space:
mode:
authorflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-06 21:52:14 +0000
committerflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-06 21:52:14 +0000
commit9de0a1096ca6e5984f87b7bda3ed131aea4e0d95 (patch)
tree4bb84863952c8e4a62b279607fc53cb421a5a309 /ui/base/win
parent21a04d9ca8216d1ea45ae20740ef307305960505 (diff)
downloadchromium_src-9de0a1096ca6e5984f87b7bda3ed131aea4e0d95.zip
chromium_src-9de0a1096ca6e5984f87b7bda3ed131aea4e0d95.tar.gz
chromium_src-9de0a1096ca6e5984f87b7bda3ed131aea4e0d95.tar.bz2
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
Diffstat (limited to 'ui/base/win')
-rw-r--r--ui/base/win/dpi.cc7
1 files changed, 5 insertions, 2 deletions
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<float>(GetDPI().width()) /
- static_cast<float>(kDefaultDPIX);
+ if (IsHighDPIEnabled()) {
+ return static_cast<float>(GetDPI().width()) /
+ static_cast<float>(kDefaultDPIX);
+ }
+ return 1.0;
}
bool IsInHighDPIMode() {