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

Unified Diff: ui/gfx/display.cc

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revert spurious changes, plus some corrections. Created 7 years, 7 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/canvas_paint_win.h ('k') | ui/gfx/font.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/display.cc
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc
index fe89b5e9b9ce793b46456a33a58b9f45f872f669..42887c2f4b68f49dcb45aa4d5488a29f15e21d38 100644
--- a/ui/gfx/display.cc
+++ b/ui/gfx/display.cc
@@ -70,7 +70,7 @@ Display::Display(int64 id, const gfx::Rect& bounds)
work_area_(bounds),
device_scale_factor_(GetForcedDeviceScaleFactor()),
rotation_(ROTATE_0) {
-#if defined(USE_AURA)
+#if defined(USE_AURA) || defined(ENABLE_HIDPI)
SetScaleAndBounds(device_scale_factor_, bounds);
#endif
}
@@ -108,7 +108,7 @@ void Display::SetScaleAndBounds(
void Display::SetSize(const gfx::Size& size_in_pixel) {
gfx::Point origin = bounds_.origin();
-#if defined(USE_AURA)
+#if defined(USE_AURA) || defined(ENABLE_HIDPI)
gfx::PointF origin_f = origin;
origin_f.Scale(device_scale_factor_);
origin.SetPoint(origin_f.x(), origin_f.y());
« no previous file with comments | « ui/gfx/canvas_paint_win.h ('k') | ui/gfx/font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698