Chromium Code Reviews| Index: components/wallpaper/wallpaper_manager_base.cc |
| diff --git a/components/wallpaper/wallpaper_manager_base.cc b/components/wallpaper/wallpaper_manager_base.cc |
| index eabe252ce15513904e4be916b8a2d43443692cf6..d618ae68284e77b77ba226c43a8a8a957b477310 100644 |
| --- a/components/wallpaper/wallpaper_manager_base.cc |
| +++ b/components/wallpaper/wallpaper_manager_base.cc |
| @@ -910,17 +910,17 @@ base::TimeDelta WallpaperManagerBase::GetWallpaperLoadDelay() const { |
| void WallpaperManagerBase::OnCustomizedDefaultWallpaperDecoded( |
| const GURL& wallpaper_url, |
| scoped_ptr<CustomizedWallpaperRescaledFiles> rescaled_files, |
| - const user_manager::UserImage& wallpaper) { |
| + scoped_ptr< user_manager::UserImage> wallpaper) { |
|
hashimoto
2016/03/15 08:39:27
nit: "< " -> "<"
satorux1
2016/03/16 02:01:30
Done.
|
| DCHECK(thread_checker_.CalledOnValidThread()); |
| // If decoded wallpaper is empty, we have probably failed to decode the file. |
| - if (wallpaper.image().isNull()) { |
| + if (wallpaper->image().isNull()) { |
| LOG(WARNING) << "Failed to decode customized wallpaper."; |
| return; |
| } |
| - wallpaper.image().EnsureRepsForSupportedScales(); |
| - scoped_ptr<gfx::ImageSkia> deep_copy(wallpaper.image().DeepCopy()); |
| + wallpaper->image().EnsureRepsForSupportedScales(); |
| + scoped_ptr<gfx::ImageSkia> deep_copy(wallpaper->image().DeepCopy()); |
|
hashimoto
2016/03/15 08:39:27
Do we still need to deep copy the image here?
Can'
satorux1
2016/03/16 02:01:30
Good point. Wanted to test but this code path is h
|
| scoped_ptr<bool> success(new bool(false)); |
| scoped_ptr<gfx::ImageSkia> small_wallpaper_image(new gfx::ImageSkia); |
| @@ -929,7 +929,7 @@ void WallpaperManagerBase::OnCustomizedDefaultWallpaperDecoded( |
| // TODO(bshe): This may break if Bytes becomes RefCountedMemory. |
| base::Closure resize_closure = base::Bind( |
| &WallpaperManagerBase::ResizeCustomizedDefaultWallpaper, |
| - base::Passed(&deep_copy), wallpaper.image_bytes(), |
| + base::Passed(&deep_copy), wallpaper->image_bytes(), |
|
hashimoto
2016/03/15 08:39:27
This line still copies image bytes.
satorux1
2016/03/16 02:01:30
Added a TODO comment.
|
| base::Unretained(rescaled_files.get()), base::Unretained(success.get()), |
| base::Unretained(small_wallpaper_image.get()), |
| base::Unretained(large_wallpaper_image.get())); |