Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/base/resource/resource_bundle.h" | 5 #include "ui/base/resource/resource_bundle.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 396 return NULL; | 396 return NULL; |
| 397 } | 397 } |
| 398 | 398 |
| 399 gfx::Image* ResourceBundle::GetEmptyImage() { | 399 gfx::Image* ResourceBundle::GetEmptyImage() { |
| 400 base::AutoLock lock(*images_and_fonts_lock_); | 400 base::AutoLock lock(*images_and_fonts_lock_); |
| 401 | 401 |
| 402 static gfx::Image* empty_image = NULL; | 402 static gfx::Image* empty_image = NULL; |
| 403 if (!empty_image) { | 403 if (!empty_image) { |
| 404 // The placeholder bitmap is bright red so people notice the problem. | 404 // The placeholder bitmap is bright red so people notice the problem. |
| 405 // This bitmap will be leaked, but this code should never be hit. | 405 // This bitmap will be leaked, but this code should never be hit. |
| 406 SkBitmap* bitmap = new SkBitmap(); | 406 SkBitmap bitmap = SkBitmap(); |
|
Robert Sesek
2012/05/04 20:11:59
Extra assignment.
| |
| 407 bitmap->setConfig(SkBitmap::kARGB_8888_Config, 32, 32); | 407 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 32, 32); |
| 408 bitmap->allocPixels(); | 408 bitmap.allocPixels(); |
| 409 bitmap->eraseARGB(255, 255, 0, 0); | 409 bitmap.eraseARGB(255, 255, 0, 0); |
| 410 empty_image = new gfx::Image(bitmap); | 410 empty_image = new gfx::Image(bitmap); |
| 411 } | 411 } |
| 412 return empty_image; | 412 return empty_image; |
| 413 } | 413 } |
| 414 | 414 |
| 415 } // namespace ui | 415 } // namespace ui |
| OLD | NEW |