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

Unified Diff: ash/desktop_background/desktop_background_controller.cc

Issue 12746002: Re-implement overscan & Implement Display Rotation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 | « ash/ash.gyp ('k') | ash/display/display_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/desktop_background/desktop_background_controller.cc
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index 9c89b71a44adbeea5b20fac35cb9540f3b4553e1..385e3dfc6ae9a046c608d42bc3ac92e2667759fb 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -250,9 +250,13 @@ WallpaperResolution DesktopBackgroundController::GetAppropriateResolution() {
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
for (Shell::RootWindowList::iterator iter = root_windows.begin();
iter != root_windows.end(); ++iter) {
- gfx::Size root_window_size = (*iter)->GetHostSize();
- if (root_window_size.width() > kSmallWallpaperMaxWidth ||
- root_window_size.height() > kSmallWallpaperMaxHeight) {
+ // Compare to host size as constants are defined in terms of
+ // physical pixel size.
+ // TODO(oshima): This may not be ideal for fractional scaling
+ // scenario. Revisit and fix if necessary.
+ gfx::Size host_window_size = (*iter)->GetHostSize();
+ if (host_window_size.width() > kSmallWallpaperMaxWidth ||
+ host_window_size.height() > kSmallWallpaperMaxHeight) {
resolution = WALLPAPER_RESOLUTION_LARGE;
}
}
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698