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

Unified Diff: ui/gfx/image/image_util.cc

Issue 10332163: Revert 137075 - Get rid of Image::Image(SkBitmap*) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « ui/gfx/image/image_unittest_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_util.cc
===================================================================
--- ui/gfx/image/image_util.cc (revision 137075)
+++ ui/gfx/image/image_util.cc (working copy)
@@ -13,9 +13,9 @@
namespace gfx {
Image* ImageFromPNGEncodedData(const unsigned char* input, size_t input_size) {
- SkBitmap favicon_bitmap;
- if (gfx::PNGCodec::Decode(input, input_size, &favicon_bitmap))
- return new Image(favicon_bitmap);
+ scoped_ptr<SkBitmap> favicon_bitmap(new SkBitmap());
+ if (gfx::PNGCodec::Decode(input, input_size, favicon_bitmap.get()))
+ return new Image(favicon_bitmap.release());
return NULL;
}
« no previous file with comments | « ui/gfx/image/image_unittest_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698