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

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: Created 8 years, 8 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: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 24c05606eead09f08c2297556732a361cfc9aa56..51da2df10ad3fce45f823fbe16167af31883c428 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -403,10 +403,10 @@ gfx::Image* ResourceBundle::GetEmptyImage() {
if (!empty_image) {
// The placeholder bitmap is bright red so people notice the problem.
// This bitmap will be leaked, but this code should never be hit.
- SkBitmap* bitmap = new SkBitmap();
- bitmap->setConfig(SkBitmap::kARGB_8888_Config, 32, 32);
- bitmap->allocPixels();
- bitmap->eraseARGB(255, 255, 0, 0);
+ SkBitmap bitmap = SkBitmap();
Robert Sesek 2012/05/04 20:11:59 Extra assignment.
+ bitmap.setConfig(SkBitmap::kARGB_8888_Config, 32, 32);
+ bitmap.allocPixels();
+ bitmap.eraseARGB(255, 255, 0, 0);
empty_image = new gfx::Image(bitmap);
}
return empty_image;

Powered by Google App Engine
This is Rietveld 408576698