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

Unified Diff: chrome/browser/themes/browser_theme_pack.cc

Issue 9477016: Remove all |gfx::Image(new SkBitmap(...))| antipatterns. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
Index: chrome/browser/themes/browser_theme_pack.cc
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index de73e050fbc2c883f0b8161941d005d0b3e7062d..2edf64606c68d3d93f3bfc328b6b8cf74db53b83 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -545,7 +545,7 @@ const gfx::Image* BrowserThemePack::GetImageNamed(int idr_id) const {
return NULL;
}
- gfx::Image* ret = new gfx::Image(new SkBitmap(bitmap));
+ gfx::Image* ret = new gfx::Image(bitmap);
loaded_images_[prs_id] = ret;
return ret;
@@ -892,7 +892,7 @@ bool BrowserThemePack::LoadRawBitmapsTo(
SkBitmap bitmap;
if (gfx::PNGCodec::Decode(raw_data->front(), raw_data->size(),
&bitmap)) {
- (*raw_bitmaps)[it->first] = new gfx::Image(new SkBitmap(bitmap));
+ (*raw_bitmaps)[it->first] = new gfx::Image(bitmap);
} else {
NOTREACHED() << "Unable to decode theme image resource " << it->first;
}
« no previous file with comments | « chrome/browser/profiles/profile_info_util.cc ('k') | chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698