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

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

Issue 1426933002: Refactor Windows DPI Point, Rect, and Size for Multiple Monitor DPI Awareness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make DisplayWin Standalone Created 4 years, 11 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/gfx/screen_win_unittest.cc ('k') | ui/gfx/win/dpi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/win/dpi.h
diff --git a/ui/gfx/win/dpi.h b/ui/gfx/win/dpi.h
index b77e2dc0db70ff3875758bc0969a5abe4f40c501..56455f1c4d8c6b3ee42fc2c4171df1ac3c416f46 100644
--- a/ui/gfx/win/dpi.h
+++ b/ui/gfx/win/dpi.h
@@ -18,7 +18,7 @@ namespace gfx {
// will be that returned by GetDPIScale().
GFX_EXPORT void SetDefaultDeviceScaleFactor(float scale);
-GFX_EXPORT Size GetDPI();
+GFX_EXPORT int GetDPIFromScalingFactor(float device_scaling_factor);
// Gets the scale factor of the display. For example, if the display DPI is
// 96 then the scale factor is 1.0. This clamps scale factors <= 1.25 to 1.0 to
@@ -28,20 +28,6 @@ GFX_EXPORT float GetDPIScale();
namespace win {
-GFX_EXPORT Point ScreenToDIPPoint(const Point& pixel_point);
-
-GFX_EXPORT Point DIPToScreenPoint(const Point& dip_point);
-
-// WARNING: there is no right way to scale sizes and rects. The implementation
-// of these strives to maintain a constant size by scaling the size independent
-// of the origin. An alternative is to get the enclosing rect, which is the
-// right way for some situations. Understand which you need before blindly
-// assuming this is the right way.
-GFX_EXPORT Rect ScreenToDIPRect(const Rect& pixel_bounds);
-GFX_EXPORT Rect DIPToScreenRect(const Rect& dip_bounds);
-GFX_EXPORT Size ScreenToDIPSize(const Size& size_in_pixels);
-GFX_EXPORT Size DIPToScreenSize(const Size& dip_size);
-
// Win32's GetSystemMetrics uses pixel measures. This function calls
// GetSystemMetrics for the given |metric|, then converts the result to DIP.
GFX_EXPORT int GetSystemMetricsInDIP(int metric);
« no previous file with comments | « ui/gfx/screen_win_unittest.cc ('k') | ui/gfx/win/dpi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698