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

Unified Diff: ui/gfx/screen_win.cc

Issue 11953054: Fix high-DPI on Windows to make use of DIP scaling in WebKit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove redundant comments. Created 7 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/display.cc ('k') | ui/surface/accelerated_surface_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_win.cc
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc
index 80614a4bf34a892a2a4fc506fa7a83cbafd26fff..f17fbc4a3935e9a378e8cac37f24d92f9813d8fb 100644
--- a/ui/gfx/screen_win.cc
+++ b/ui/gfx/screen_win.cc
@@ -36,7 +36,11 @@ ScreenWin::~ScreenWin() {
}
bool ScreenWin::IsDIPEnabled() {
+#if defined(ENABLE_HIDPI)
+ return true;
+#else
return false;
+#endif
}
gfx::Point ScreenWin::GetCursorScreenPoint() {
@@ -92,8 +96,12 @@ gfx::Display ScreenWin::GetPrimaryDisplay() const {
MONITORINFO mi = GetMonitorInfoForMonitor(
MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY));
gfx::Display display = GetDisplay(mi);
+#if !defined(ENABLE_HIDPI)
+ // TODO(kevers|girard): Test if these checks can be reintroduced for high-DIP
+ // once more of the app is DIP-aware.
DCHECK_EQ(GetSystemMetrics(SM_CXSCREEN), display.size().width());
DCHECK_EQ(GetSystemMetrics(SM_CYSCREEN), display.size().height());
+#endif
return display;
}
« no previous file with comments | « ui/gfx/display.cc ('k') | ui/surface/accelerated_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698