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

Unified Diff: ui/gfx/win/dpi.cc

Issue 600263002: Get Win32K lockdown for renderers working again on Windows 8+. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linux build failures Created 6 years, 3 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
« chrome/chrome.isolate ('K') | « testing/buildbot/chromium_win8_trybot.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/win/dpi.cc
diff --git a/ui/gfx/win/dpi.cc b/ui/gfx/win/dpi.cc
index 8639a35e2e106ff4326050f266ce6d5462ed8100..88766ce2d4f6da8b12cf5a6e9c2298230dda9fd0 100644
--- a/ui/gfx/win/dpi.cc
+++ b/ui/gfx/win/dpi.cc
@@ -134,14 +134,15 @@ Size GetDPI() {
float GetDPIScale() {
if (IsHighDPIEnabled()) {
- if (GetDPI().width() <= 120) {
- // 120 logical pixels is 125% scale. We do this to maintain previous
+ if (gfx::Display::HasForceDeviceScaleFactor())
+ return gfx::Display::GetForcedDeviceScaleFactor();
+ float dpi_scale = GetUnforcedDeviceScaleFactor();
+ if (dpi_scale <= 1.25) {
+ // Force 125% and below to 100% scale. We do this to maintain previous
// (non-DPI-aware) behavior where only the font size was boosted.
- return 1.0;
+ dpi_scale = 1.0;
}
- return gfx::Display::HasForceDeviceScaleFactor() ?
- gfx::Display::GetForcedDeviceScaleFactor() :
- GetUnforcedDeviceScaleFactor();
+ return dpi_scale;
}
return 1.0;
}
« chrome/chrome.isolate ('K') | « testing/buildbot/chromium_win8_trybot.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698