Commit eb2a04f6 authored by girard@chromium.org's avatar girard@chromium.org

GetDeviceCaps doesn't need to be scaled.

At scale factors above 125%, we are over-scaling up the dpi calculation.

BUG=292607

Review URL: https://chromiumcodereview.appspot.com/23851034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223478 0039d316-1c4b-4281-b951-d872f2087c98
parent bb6d0132
......@@ -58,7 +58,6 @@
#if defined(OS_WIN)
#include "base/win/metro.h"
#include "ui/gfx/win/dpi.h"
// http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx
extern "C" IMAGE_DOS_HEADER __ImageBase;
......@@ -305,8 +304,6 @@ BOOL CALLBACK GetMonitorDPICallback(HMONITOR, HDC hdc, LPRECT, LPARAM dwData) {
GetDeviceCaps(hdc, HORZRES) / (size_x / kMillimetersPerInch) : 0;
double dpi_y = (size_y > 0) ?
GetDeviceCaps(hdc, VERTRES) / (size_y / kMillimetersPerInch) : 0;
dpi_x *= gfx::win::GetUndocumentedDPIScale();
dpi_y *= gfx::win::GetUndocumentedDPIScale();
screen_info->max_dpi_x = std::max(dpi_x, screen_info->max_dpi_x);
screen_info->max_dpi_y = std::max(dpi_y, screen_info->max_dpi_y);
return TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment