| 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 a4179654c8af184fed919c24fe6bf3dbb77b5eac..264589ceb87888f8e5cc321d76c248abe3c618d7 100644
|
| --- a/ash/desktop_background/desktop_background_view.cc
|
| +++ b/ash/desktop_background/desktop_background_view.cc
|
| @@ -61,9 +61,9 @@ static int RoundPositive(double x) {
|
| // DesktopBackgroundView, public:
|
|
|
| DesktopBackgroundView::DesktopBackgroundView(const SkBitmap& wallpaper,
|
| - ImageLayout layout) {
|
| + WallpaperLayout layout) {
|
| wallpaper_ = wallpaper;
|
| - image_layout_ = layout;
|
| + wallpaper_layout_ = layout;
|
| wallpaper_.buildMipMap(false);
|
| }
|
|
|
| @@ -80,7 +80,7 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
|
| // streching to avoid upsampling artifacts (Note that we could tile too, but
|
| // decided not to do this at the moment).
|
| gfx::Rect wallpaper_rect(0, 0, wallpaper_.width(), wallpaper_.height());
|
| - if (image_layout_ == ash::CENTER_CROPPED && wallpaper_.width() > width()
|
| + if (wallpaper_layout_ == ash::CENTER_CROPPED && wallpaper_.width() > width()
|
| && wallpaper_.height() > height()) {
|
| // The dimension with the smallest ratio must be cropped, the other one
|
| // is preserved. Both are set in gfx::Size cropped_size.
|
| @@ -105,9 +105,9 @@ void DesktopBackgroundView::OnPaint(gfx::Canvas* canvas) {
|
| wallpaper_cropped_rect.width(), wallpaper_cropped_rect.height(),
|
| 0, 0, width(), height(),
|
| true);
|
| - } else if (image_layout_ == ash::TILE) {
|
| + } else if (wallpaper_layout_ == ash::TILE) {
|
| canvas->TileImageInt(wallpaper_, 0, 0, width(), height());
|
| - } else if (image_layout_ == ash::STRETCH) {
|
| + } else if (wallpaper_layout_ == ash::STRETCH) {
|
| // This is generally not recommended as it may show artifacts.
|
| canvas->DrawBitmapInt(wallpaper_, 0, 0, wallpaper_.width(),
|
| wallpaper_.height(), 0, 0, width(), height(), true);
|
| @@ -127,7 +127,8 @@ void DesktopBackgroundView::OnMouseReleased(const views::MouseEvent& event) {
|
| Shell::GetInstance()->ShowBackgroundMenu(GetWidget(), event.location());
|
| }
|
|
|
| -void CreateDesktopBackground(const SkBitmap& wallpaper, ImageLayout layout) {
|
| +void CreateDesktopBackground(const SkBitmap& wallpaper,
|
| + WallpaperLayout layout) {
|
| views::Widget* desktop_widget = new views::Widget;
|
| views::Widget::InitParams params(
|
| views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
|
|
|