Index: ash/desktop_background/desktop_background_view.cc |
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc |
index 311532e0c8dc3aa0d6f0be1ba5d9757d8a8a0c1b..b88d17b3339387fe44568520df7edf3e1bb49bcf 100644 |
--- a/ash/desktop_background/desktop_background_view.cc |
+++ b/ash/desktop_background/desktop_background_view.cc |
@@ -127,7 +127,8 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) { |
RoundPositive(static_cast<double>(height()) / horizontal_ratio)); |
} |
- gfx::Rect wallpaper_cropped_rect = wallpaper_rect.Center(cropped_size); |
+ gfx::Rect wallpaper_cropped_rect = wallpaper_rect; |
+ wallpaper_cropped_rect.ClampToCenteredSize(cropped_size); |
canvas->DrawImageInt(wallpaper, |
wallpaper_cropped_rect.x(), wallpaper_cropped_rect.y(), |
wallpaper_cropped_rect.width(), wallpaper_cropped_rect.height(), |