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

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

Issue 2695523002: Fix font sizes being incorrect when using --force-device-scale-factor. (Closed)
Patch Set: fix test link 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
« no previous file with comments | « ui/display/win/dpi.h ('k') | ui/display/win/screen_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/win/dpi.cc
diff --git a/ui/display/win/dpi.cc b/ui/display/win/dpi.cc
index 81a96a1b0dd6e594fcd1ed2957ea66329710c7aa..45e0aad18e45aa6e529df7f77fe3e39d4e028767 100644
--- a/ui/display/win/dpi.cc
+++ b/ui/display/win/dpi.cc
@@ -35,12 +35,6 @@ gfx::Size GetDPI() {
return gfx::Size(dpi_x, dpi_y);
}
-float GetUnforcedDeviceScaleFactor() {
- return g_device_scale_factor
- ? g_device_scale_factor
- : GetScalingFactorFromDPI(GetDPI().width());
-}
-
} // namespace
void SetDefaultDeviceScaleFactor(float scale) {
@@ -54,6 +48,11 @@ float GetDPIScale() {
return GetUnforcedDeviceScaleFactor();
}
+float GetUnforcedDeviceScaleFactor() {
+ return g_device_scale_factor ? g_device_scale_factor
+ : GetScalingFactorFromDPI(GetDPI().width());
+}
+
int GetDPIFromScalingFactor(float device_scaling_factor) {
return kDefaultDPI * device_scaling_factor;
}
« no previous file with comments | « ui/display/win/dpi.h ('k') | ui/display/win/screen_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698