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

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

Issue 10827368: ash: Avoid implicit conversion from ImageSkia into SkBitmap. (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/launcher/tabbed_launcher_button.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/chromeos/wallpaper_source.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.cc b/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.cc
index b1370e608a96b22b613477b1f736d557f2666a5f..cd2640cc295aea8743ff60e8c94ccba3d67637be 100644
--- a/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.cc
@@ -128,9 +128,13 @@ void WallpaperImageSource::GetCurrentUserWallpaper(int request_id) {
SkBitmap image;
TRACE_EVENT0("LOCK_SCREEN", "GetCurrentUserWallpaper");
if (chromeos::UserManager::Get()->IsUserLoggedIn()) {
- SkBitmap wallpaper = ash::Shell::GetInstance()->
- desktop_background_controller()->
- GetCurrentWallpaperImage();
+ // TODO(sad|bshe): It maybe necessary to include the scale factor in the
+ // request (as is done for user-image and wallpaper-thumbnails).
+ SkBitmap wallpaper;
+ gfx::ImageSkia wallpaper_skia = ash::Shell::GetInstance()->
+ desktop_background_controller()->GetCurrentWallpaperImage();
+ if (!wallpaper_skia.empty())
+ wallpaper = *wallpaper_skia.bitmap();
SkBitmap copy;
if (wallpaper.deepCopyTo(&copy, wallpaper.config()))
image = copy;
« no previous file with comments | « ash/launcher/tabbed_launcher_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698