Fix ScreenLockerTest. Check whether bitmap is valid.

See also http://crbug.com/96032

BUG=124339
TBR=antrim@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10834169

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150018 0039d316-1c4b-4281-b951-d872f2087c98
parent ff8b621b
...@@ -57,6 +57,10 @@ class WallpaperImageSource::WallpaperEncodingOperation ...@@ -57,6 +57,10 @@ class WallpaperImageSource::WallpaperEncodingOperation
return; return;
TRACE_EVENT0("LOCK_SCREEN", "imageEncoding"); TRACE_EVENT0("LOCK_SCREEN", "imageEncoding");
SkAutoLockPixels lock_input(image_); SkAutoLockPixels lock_input(image_);
if (!image_.readyToDraw())
return;
// Avoid compression to make things faster. // Avoid compression to make things faster.
gfx::PNGCodec::EncodeWithCompressionLevel( gfx::PNGCodec::EncodeWithCompressionLevel(
reinterpret_cast<unsigned char*>(image_.getAddr32(0, 0)), reinterpret_cast<unsigned char*>(image_.getAddr32(0, 0)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment