diff options
author | dnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 19:13:40 +0000 |
---|---|---|
committer | dnicoara@chromium.org <dnicoara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 19:13:40 +0000 |
commit | aa0759e04b57f8be7412036f0fed1435d460ab4e (patch) | |
tree | 596d4617513e80a6c440ede8d421ec5a1c3b3174 /ui/views/widget | |
parent | e4c4b6cd5e8075f87a738ce53c3a27617f57704c (diff) | |
download | chromium_src-aa0759e04b57f8be7412036f0fed1435d460ab4e.zip chromium_src-aa0759e04b57f8be7412036f0fed1435d460ab4e.tar.gz chromium_src-aa0759e04b57f8be7412036f0fed1435d460ab4e.tar.bz2 |
Move Is*DisplaySizeBlackListed to ui/display and build it for non-X11 platforms as well
BUG=333413
Review URL: https://codereview.chromium.org/226163002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/widget')
-rw-r--r-- | ui/views/widget/desktop_aura/desktop_screen_x11.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc index 970d86c..99f90e6 100644 --- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc @@ -16,7 +16,7 @@ #include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_tree_host.h" #include "ui/base/layout.h" -#include "ui/base/x/x11_util.h" +#include "ui/display/display_util.h" #include "ui/display/x11/edid_parser_x11.h" #include "ui/gfx/display.h" #include "ui/gfx/display_observer.h" @@ -48,14 +48,14 @@ std::vector<gfx::Display> GetFallbackDisplayList() { ::Screen* screen = DefaultScreenOfDisplay(display); int width = WidthOfScreen(screen); int height = HeightOfScreen(screen); - int mm_width = WidthMMOfScreen(screen); - int mm_height = HeightMMOfScreen(screen); + gfx::Size physical_size(WidthMMOfScreen(screen), HeightMMOfScreen(screen)); gfx::Rect bounds_in_pixels(0, 0, width, height); gfx::Display gfx_display(0, bounds_in_pixels); if (!gfx::Display::HasForceDeviceScaleFactor() && - !ui::IsXDisplaySizeBlackListed(mm_width, mm_height)) { - float device_scale_factor = GetDeviceScaleFactor(width, mm_width); + !ui::IsDisplaySizeBlackListed(physical_size)) { + float device_scale_factor = GetDeviceScaleFactor( + width, physical_size.width()); DCHECK_LE(1.0f, device_scale_factor); gfx_display.SetScaleAndBounds(device_scale_factor, bounds_in_pixels); } @@ -386,8 +386,8 @@ std::vector<gfx::Display> DesktopScreenX11::BuildDisplaysFromXRandRInfo() { gfx::Display display(display_id, crtc_bounds); if (!gfx::Display::HasForceDeviceScaleFactor()) { - if (i == 0 && !ui::IsXDisplaySizeBlackListed(output_info->mm_width, - output_info->mm_height)) { + if (i == 0 && !ui::IsDisplaySizeBlackListed( + gfx::Size(output_info->mm_width, output_info->mm_height))) { // As per display scale factor is not supported right now, // the primary display's scale factor is always used. device_scale_factor = GetDeviceScaleFactor(crtc->width, |