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

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

Issue 10834169: Fix ScreenLockerTest. Check whether bitmap is valid. (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 | « no previous file | 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 70e1d09d04902aeb1abf6bf254e726514ca47d77..b1370e608a96b22b613477b1f736d557f2666a5f 100644
--- a/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/wallpaper_source.cc
@@ -57,6 +57,10 @@ class WallpaperImageSource::WallpaperEncodingOperation
return;
TRACE_EVENT0("LOCK_SCREEN", "imageEncoding");
SkAutoLockPixels lock_input(image_);
+
+ if (!image_.readyToDraw())
+ return;
+
// Avoid compression to make things faster.
gfx::PNGCodec::EncodeWithCompressionLevel(
reinterpret_cast<unsigned char*>(image_.getAddr32(0, 0)),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698