From a4c094ab04b6a30404eea4a914cbb01f45866f17 Mon Sep 17 00:00:00 2001 From: "mukai@chromium.org" Date: Thu, 7 Nov 2013 20:34:47 +0000 Subject: Allow GrabWindowSnapshot() to fail when libpng fails. BUG=280195 R=sky@chromium.org, kinaba@chromium.org TEST=None Review URL: https://codereview.chromium.org/59073011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233678 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/snapshot/snapshot_aura.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/snapshot/snapshot_aura.cc b/ui/snapshot/snapshot_aura.cc index ea4cb1b..1cebfe9 100644 --- a/ui/snapshot/snapshot_aura.cc +++ b/ui/snapshot/snapshot_aura.cc @@ -79,12 +79,12 @@ bool GrabWindowSnapshot(gfx::NativeWindow window, unsigned char* pixels = reinterpret_cast( bitmap.pixelRef()->pixels()); - gfx::PNGCodec::Encode(pixels, gfx::PNGCodec::FORMAT_BGRA, - gfx::Size(bitmap.width(), bitmap.height()), - base::checked_numeric_cast(bitmap.rowBytes()), - true, std::vector(), - png_representation); - return true; + return gfx::PNGCodec::Encode( + pixels, gfx::PNGCodec::FORMAT_BGRA, + gfx::Size(bitmap.width(), bitmap.height()), + base::checked_numeric_cast(bitmap.rowBytes()), + true, std::vector(), + png_representation); } } // namespace ui -- cgit v1.1