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

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

Issue 2695523002: Fix font sizes being incorrect when using --force-device-scale-factor. (Closed)
Patch Set: move to screen_win Created 3 years, 10 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/display/win/screen_win.h
diff --git a/ui/display/win/screen_win.h b/ui/display/win/screen_win.h
index 94379e055f3245938004c1689456f803f0aad7c9..5b6682152963a9098879c41dcec97824ba71b2a3 100644
--- a/ui/display/win/screen_win.h
+++ b/ui/display/win/screen_win.h
@@ -102,6 +102,13 @@ class DISPLAY_EXPORT ScreenWin : public Screen {
// Returns |hwnd|'s scale factor.
static float GetScaleFactorForHWND(HWND hwnd);
+ // Returns the system's global scale factor. In most cases you should prefer
robliao 2017/02/15 18:43:16 Possible rephrasing. What do you think? Returns t
Bret 2017/02/15 20:43:16 Yeah yours is clearer. I edited it slightly.
+ // GetScaleFactorForHWND (so as to be per-monitor aware) but occasionally
+ // we need this value specifically, usually when working with a value from
+ // SystemParametersInfo. Also ignores --force-device-scale-factor since that
+ // interferes with working directly from the system.
+ static float GetSystemScaleFactor();
+
// Returns the HWND associated with the NativeView.
virtual HWND GetHWNDFromNativeView(gfx::NativeView window) const;

Powered by Google App Engine
This is Rietveld 408576698