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

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 10378009: Get rid of Image::Image(SkBitmap*) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: k 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 | « chrome/tools/profiles/generate_profile.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/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index bb011ab5b402907ea1459085f135cb08b5647550..693677c8ae7dfb22375993eb0846fc0b7a329c7d 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -465,10 +465,10 @@ gfx::Image& ResourceBundle::GetEmptyImage() {
if (empty_image_.IsEmpty()) {
// The placeholder bitmap is bright red so people notice the problem.
- SkBitmap* bitmap = new SkBitmap();
- bitmap->setConfig(SkBitmap::kARGB_8888_Config, 32, 32);
- bitmap->allocPixels();
- bitmap->eraseARGB(255, 255, 0, 0);
+ SkBitmap bitmap;
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 32, 32);
+ bitmap.allocPixels();
+ bitmap.eraseARGB(255, 255, 0, 0);
empty_image_ = gfx::Image(bitmap);
}
return empty_image_;
« no previous file with comments | « chrome/tools/profiles/generate_profile.cc ('k') | ui/gfx/image/image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698