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

Unified Diff: ui/app_list/app_list_item_view.cc

Issue 10820049: Load 2x resources on demand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment 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 | « ui/app_list/app_list_item_model.cc ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_item_view.cc
diff --git a/ui/app_list/app_list_item_view.cc b/ui/app_list/app_list_item_view.cc
index 8c405fbe26fcb1f3a55ea54bc63ef1e22c5260bb..c5263bb8902022759474b5b1bb55d8b6d44f1374 100644
--- a/ui/app_list/app_list_item_view.cc
+++ b/ui/app_list/app_list_item_view.cc
@@ -104,16 +104,8 @@ class AppListItemView::IconOperation
skia::ImageOperations::RESIZE_BEST, size_));
gfx::ImageSkia shadow(
gfx::ImageSkiaOperations::CreateImageWithDropShadow(resized, shadows_));
-
- // The following statement causes shadowed image being generated for all
- // existing image reps in |image_|. This is needed so that expensive shadow
- // generation does not run on UI thread.
- gfx::ImageSkia::ImageSkiaReps image_reps = image_.image_reps();
- for (gfx::ImageSkia::ImageSkiaReps::const_iterator it = image_reps.begin();
- it != image_reps.end(); ++it) {
- shadow.GetRepresentation(it->scale_factor());
- }
image_ = shadow;
+ image_.MakeThreadSafe();
}
void Cancel() {
« no previous file with comments | « ui/app_list/app_list_item_model.cc ('k') | ui/base/resource/resource_bundle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698