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

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: Rebase 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
« no previous file with comments | « ui/base/win/dpi.h ('k') | ui/base/win/events_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/dpi.cc
diff --git a/ui/base/win/dpi.cc b/ui/base/win/dpi.cc
index 9b2db5b75518f5d84a67ab07443358c329d3c965..e4bc4579b2bb39b6d3c75cbb6bd85caab7f57b5b 100644
--- a/ui/base/win/dpi.cc
+++ b/ui/base/win/dpi.cc
@@ -104,6 +104,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(
« no previous file with comments | « ui/base/win/dpi.h ('k') | ui/base/win/events_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698