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

Unified Diff: ui/display/win/screen_win.cc

Issue 2176183005: Allow Forced Scale Factor with Per-Monitor DPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/win/screen_win.cc
diff --git a/ui/display/win/screen_win.cc b/ui/display/win/screen_win.cc
index 5104d5c78e552ee803e5cc9456e8af0263e1e713..39c9a713a2be1ede88ba5aed2f8e2683f14b4118 100644
--- a/ui/display/win/screen_win.cc
+++ b/ui/display/win/screen_win.cc
@@ -35,6 +35,9 @@ ScreenWin* g_screen_win_instance = nullptr;
float GetMonitorScaleFactor(HMONITOR monitor) {
DCHECK(monitor);
+ if (display::Display::HasForceDeviceScaleFactor())
+ return display::Display::GetForcedDeviceScaleFactor();
+
if (base::win::IsProcessPerMonitorDpiAware()) {
static auto get_dpi_for_monitor_func = [](){
using GetDpiForMonitorPtr = decltype(::GetDpiForMonitor)*;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698