diff options
Diffstat (limited to 'ash/desktop_background')
-rw-r--r-- | ash/desktop_background/desktop_background_view.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc index c3028fc..8dcc4a3 100644 --- a/ash/desktop_background/desktop_background_view.cc +++ b/ash/desktop_background/desktop_background_view.cc @@ -103,7 +103,7 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) { } gfx::Rect wallpaper_cropped_rect = wallpaper_rect.Center(cropped_size); - canvas->DrawImageInt(wallpaper_, + canvas->DrawBitmapInt(wallpaper_, wallpaper_cropped_rect.x(), wallpaper_cropped_rect.y(), wallpaper_cropped_rect.width(), wallpaper_cropped_rect.height(), 0, 0, width(), height(), @@ -112,11 +112,11 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) { canvas->TileImageInt(wallpaper_, 0, 0, width(), height()); } else if (wallpaper_layout_ == ash::STRETCH) { // This is generally not recommended as it may show artifacts. - canvas->DrawImageInt(wallpaper_, 0, 0, wallpaper_.width(), + canvas->DrawBitmapInt(wallpaper_, 0, 0, wallpaper_.width(), wallpaper_.height(), 0, 0, width(), height(), true); } else { // All other are simply centered, and not scaled (but may be clipped). - canvas->DrawImageInt(wallpaper_, (width() - wallpaper_.width()) / 2, + canvas->DrawBitmapInt(wallpaper_, (width() - wallpaper_.width()) / 2, (height() - wallpaper_.height()) / 2); } } |