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

Unified Diff: chrome/browser/chromeos/login/wallpaper_manager.cc

Issue 10823358: image: Specify the resize-method when resizing ImageSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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/system/user/tray_user.cc ('k') | chrome/browser/icon_loader_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index 06837af7f81472e8c14528b795c9c96883445016..14f3ce6a5e030dfc5574fa4a0c02e720aee545a5 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -31,8 +31,8 @@
#include "chromeos/dbus/power_manager_client.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
-#include "skia/ext/image_operations.h"
#include "ui/gfx/codec/png_codec.h"
+#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/skia_util.h"
using content::BrowserThread;
@@ -519,10 +519,10 @@ void WallpaperManager::CacheWallpaper(const std::string& email,
void WallpaperManager::CacheThumbnail(const std::string& email,
const gfx::ImageSkia& wallpaper) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- gfx::ImageSkia thumbnail =
- skia::ImageOperations::Resize(wallpaper,
- skia::ImageOperations::RESIZE_LANCZOS3,
- kThumbnailWidth, kThumbnailHeight);
+ gfx::ImageSkia thumbnail = gfx::ImageSkiaOperations::CreateResizedImage(
sky 2012/08/16 16:25:59 This code runs off the UI thread. I don't think Im
sadrul 2012/08/16 17:15:12 Ah, very interesting. I think we already have this
+ wallpaper,
+ skia::ImageOperations::RESIZE_LANCZOS3,
+ gfx::Size(kThumbnailWidth, kThumbnailHeight));
custom_wallpaper_thumbnail_cache_[email] = thumbnail;
}
@@ -582,10 +582,10 @@ void WallpaperManager::GenerateUserWallpaperThumbnail(
base::WeakPtr<WallpaperDelegate> delegate,
const gfx::ImageSkia& wallpaper) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- gfx::ImageSkia thumbnail =
- skia::ImageOperations::Resize(wallpaper,
- skia::ImageOperations::RESIZE_LANCZOS3,
- kThumbnailWidth, kThumbnailHeight);
+ gfx::ImageSkia thumbnail = gfx::ImageSkiaOperations::CreateResizedImage(
+ wallpaper,
+ skia::ImageOperations::RESIZE_LANCZOS3,
+ gfx::Size(kThumbnailWidth, kThumbnailHeight));
custom_wallpaper_thumbnail_cache_[email] = thumbnail;
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | chrome/browser/icon_loader_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698