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

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: Code review comments 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
Index: ui/gfx/win/dpi.cc
diff --git a/ui/gfx/win/dpi.cc b/ui/gfx/win/dpi.cc
index e93a38d8bd00cee34c1fae4fc8007d56709d6d57..9e4f0b276362abe6ba2ecff66c33700cfd777be5 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;
}
« testing/buildbot/chromium_win8_trybot.json ('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