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

Unified Diff: ui/gfx/icon_util.cc

Issue 78903003: Added a new overload of gfx::Image::CreateFrom1xPNGBytes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years 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 | « chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc ('k') | ui/gfx/image/image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icon_util.cc
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
index 223618601e32bb6311c23dd45416e06c12d7210c..521c0410937671a4befa07315814e20b799c46a0 100644
--- a/ui/gfx/icon_util.cc
+++ b/ui/gfx/icon_util.cc
@@ -292,7 +292,8 @@ scoped_ptr<SkBitmap> IconUtil::CreateSkBitmapFromIconResource(HMODULE module,
const unsigned char* png_bytes =
reinterpret_cast<const unsigned char*>(png_data);
- gfx::Image image = gfx::Image::CreateFrom1xPNGBytes(png_bytes, png_size);
+ gfx::Image image = gfx::Image::CreateFrom1xPNGBytes(
+ new base::RefCountedStaticMemory(png_bytes, png_size));
return scoped_ptr<SkBitmap>(new SkBitmap(image.AsBitmap()));
}
« no previous file with comments | « chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc ('k') | ui/gfx/image/image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698