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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc

Issue 10832019: Speed up custom wallpaper switching time and wallpaper manager code refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
Index: chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc b/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc
index bc4fd668a78f2518b5f73b64cf687718e844c4c2..d089cb6de54ca53cc7ce827e0b8047e129259034 100644
--- a/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source.cc
@@ -15,6 +15,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/threading/worker_pool.h"
#include "chrome/browser/chromeos/login/user_manager.h"
+#include "chrome/browser/chromeos/login/wallpaper_manager.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
#include "chrome/common/url_constants.h"
@@ -51,8 +52,9 @@ class WallpaperThumbnailSource::ThumbnailEncodingOperation
void EncodeThumbnail() {
if (cancel_flag_.IsSet())
return;
- gfx::PNGCodec::EncodeBGRASkBitmap(user_->wallpaper_thumbnail(),
- false, &data_->data());
+ gfx::PNGCodec::EncodeBGRASkBitmap(
+ WallpaperManager::Get()->GetCustomWallpaperThumbnail(user_->email()),
Ivan Korotkov 2012/07/27 23:02:02 What about caching encoded thumbnails? Actually, d
bshe 2012/07/31 14:27:54 Yes. Only blobs is needed. Could I do it in a se
Ivan Korotkov 2012/07/31 21:18:16 Yes, sure.
+ false, &data_->data());
}
void Cancel() {

Powered by Google App Engine
This is Rietveld 408576698