summaryrefslogtreecommitdiffstats
path: root/ui/surface/accelerated_surface_win.cc
diff options
context:
space:
mode:
authorgirard@chromium.org <girard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-17 23:48:19 +0000
committergirard@chromium.org <girard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-17 23:48:19 +0000
commitddc29710d4aa01fe2243da8005924c0a6c491ee0 (patch)
treeec09843d60aa3dc0fdc822be0914ef3d6fcc0d10 /ui/surface/accelerated_surface_win.cc
parentdaa33a05ff5a1ee661734dacdd034b10a5795928 (diff)
downloadchromium_src-ddc29710d4aa01fe2243da8005924c0a6c491ee0.zip
chromium_src-ddc29710d4aa01fe2243da8005924c0a6c491ee0.tar.gz
chromium_src-ddc29710d4aa01fe2243da8005924c0a6c491ee0.tar.bz2
Tear out ENABLED_HIDPI (use --high-dpi-support=1 instead)
BUG=243445 Review URL: https://chromiumcodereview.appspot.com/17084010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206838 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/surface/accelerated_surface_win.cc')
-rw-r--r--ui/surface/accelerated_surface_win.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/ui/surface/accelerated_surface_win.cc b/ui/surface/accelerated_surface_win.cc
index fcf45e5..01f582f 100644
--- a/ui/surface/accelerated_surface_win.cc
+++ b/ui/surface/accelerated_surface_win.cc
@@ -724,18 +724,17 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
// If the window is a different size than the swap chain that is being
// presented then drop the frame.
gfx::Size window_size = GetWindowSize();
-#if defined(ENABLE_HIDPI)
- // Check if the size mismatch is within allowable round off or truncation
- // error.
- gfx::Size dip_size = ui::win::ScreenToDIPSize(window_size);
- gfx::Size pixel_size = ui::win::DIPToScreenSize(dip_size);
- bool size_mismatch = abs(window_size.width() - size.width()) >
- abs(window_size.width() - pixel_size.width()) ||
- abs(window_size.height() - size.height()) >
- abs(window_size.height() - pixel_size.height());
-#else
bool size_mismatch = size != window_size;
-#endif
+ if (ui::IsInHighDPIMode()) {
+ // Check if the size mismatch is within allowable round off or truncation
+ // error.
+ gfx::Size dip_size = ui::win::ScreenToDIPSize(window_size);
+ gfx::Size pixel_size = ui::win::DIPToScreenSize(dip_size);
+ size_mismatch = abs(window_size.width() - size.width()) >
+ abs(window_size.width() - pixel_size.width()) ||
+ abs(window_size.height() - size.height()) >
+ abs(window_size.height() - pixel_size.height());
+ }
if (hidden_ && size_mismatch) {
TRACE_EVENT2("gpu", "EarlyOut_WrongWindowSize",
"backwidth", size.width(), "backheight", size.height());