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

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

Issue 2182333005: Audit and Deprecate DPI Functions in display::win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Deprecation 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/dpi.h
diff --git a/ui/display/win/dpi.h b/ui/display/win/dpi.h
index 23ec954c259a7faa00f96171f0ca960ab0186896..52d961bb54af1a9dd78eaa482f7362d9b0a34941 100644
--- a/ui/display/win/dpi.h
+++ b/ui/display/win/dpi.h
@@ -11,14 +11,16 @@
namespace display {
namespace win {
+// Deprecated. Use --force-device-scale-factor instead.
+//
// Sets the device scale factor that will be used unless overridden on the
-// command line by --force-device-scale-factor. If this is not called, and that
-// flag is not used, the scale factor used by the DIP conversion functions below
-// will be that returned by GetDPIScale().
+// command line by --force-device-scale-factor.
DISPLAY_EXPORT void SetDefaultDeviceScaleFactor(float scale);
-// Gets the scale factor of the display. For example, if the display DPI is
-// 96 then the scale factor is 1.0.
+// Deprecated. Use display::win::ScreenWin::GetScaleFactorForHWND instead.
+//
+// Gets the system's scale factor. For example, if the system DPI is 96 then the
+// scale factor is 1.0. This does not handle per-monitor DPI.
DISPLAY_EXPORT float GetDPIScale();
// Returns the equivalent DPI for |device_scaling_factor|.
@@ -27,8 +29,11 @@ DISPLAY_EXPORT int GetDPIFromScalingFactor(float device_scaling_factor);
// Returns the equivalent scaling factor for |dpi|.
DISPLAY_EXPORT float GetScalingFactorFromDPI(int dpi);
+// Deprecated. Use display::win::ScreenWin::GetSystemMetricsForHwnd instead.
+//
// Win32's GetSystemMetrics uses pixel measures. This function calls
-// GetSystemMetrics for the given |metric|, then converts the result to DIP.
+// GetSystemMetrics for the given |metric|, then converts the result using the
+// system's DPI to DIP. This does not handle per-monitor DPI.
DISPLAY_EXPORT int GetSystemMetricsInDIP(int metric);
} // namespace win
« 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