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

Unified Diff: ash/desktop_background/desktop_background_view.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 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 | « no previous file | ash/display/multi_display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « no previous file | ash/display/multi_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698