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

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

Issue 16336027: Enable high dpi in win/views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cleanup Created 7 years, 6 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/base/win/dpi.cc
diff --git a/ui/base/win/dpi.cc b/ui/base/win/dpi.cc
index 75d63bba3d48935827702617c54e05deb0f06e18..35b166f5848d3de2e8702b6ff32755dcdc424f1d 100644
--- a/ui/base/win/dpi.cc
+++ b/ui/base/win/dpi.cc
@@ -93,6 +93,11 @@ gfx::Point ScreenToDIPPoint(const gfx::Point& pixel_point) {
gfx::ScalePoint(pixel_point, 1.0f / GetDeviceScaleFactor()));
}
+gfx::Point DIPToScreenPoint(const gfx::Point& dip_point) {
+ return gfx::ToFlooredPoint(
+ gfx::ScalePoint(dip_point, GetDeviceScaleFactor()));
+}
+
gfx::Rect ScreenToDIPRect(const gfx::Rect& pixel_bounds) {
// TODO(kevers): Switch to non-deprecated method for float to int conversions.
return gfx::ToFlooredRectDeprecated(

Powered by Google App Engine
This is Rietveld 408576698