summaryrefslogtreecommitdiffstats
path: root/ui/base/win/dpi.cc
diff options
context:
space:
mode:
authorgirard@chromium.org <girard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 17:00:14 +0000
committergirard@chromium.org <girard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-12 17:00:14 +0000
commitf33ad01a701cd61dac938d2069b9f32b3fbe9dac (patch)
tree86742cdee21540a296b7d9422c9b4d7b424f5ce1 /ui/base/win/dpi.cc
parent216a3dc542084fc301465624c14920266d44ac63 (diff)
downloadchromium_src-f33ad01a701cd61dac938d2069b9f32b3fbe9dac.zip
chromium_src-f33ad01a701cd61dac938d2069b9f32b3fbe9dac.tar.gz
chromium_src-f33ad01a701cd61dac938d2069b9f32b3fbe9dac.tar.bz2
Enable high dpi in win/views.
BUG=149881 Review URL: https://chromiumcodereview.appspot.com/16336027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/win/dpi.cc')
-rw-r--r--ui/base/win/dpi.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/base/win/dpi.cc b/ui/base/win/dpi.cc
index 9b2db5b..e4bc457 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(