| 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..a68dff0d6b9f182c8871a5c463cbf90bf6b6d17d 100644
|
| --- a/ui/app_list/app_list_item_view.cc
|
| +++ b/ui/app_list/app_list_item_view.cc
|
| @@ -104,16 +104,12 @@ 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;
|
| + // Make sure that the image contains ImageSkiaReps for supported
|
| + // scale factors.
|
| + image_.EnsureRepsForSupportedScaleFactors();
|
| + // All images are generated. We no longer need source.
|
| + image_.DeleteSource();
|
| }
|
|
|
| void Cancel() {
|
|
|