| Index: ui/base/resource/resource_bundle.cc
|
| diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
|
| index 56b37619be579c567d53aa2031ca4b4fb83c6d13..a080ad3db65e5806286d1f401e187449af97a47b 100644
|
| --- a/ui/base/resource/resource_bundle.cc
|
| +++ b/ui/base/resource/resource_bundle.cc
|
| @@ -119,6 +119,11 @@ gfx::Image& ResourceBundle::GetImageNamed(int resource_id) {
|
|
|
| scoped_ptr<SkBitmap> bitmap(LoadBitmap(resources_data_, resource_id));
|
| if (bitmap.get()) {
|
| + // Check if there's a large version of the image as well.
|
| + scoped_ptr<SkBitmap> large_bitmap;
|
| + if (large_icon_resources_data_)
|
| + large_bitmap.reset(LoadBitmap(large_icon_resources_data_, resource_id));
|
| +
|
| // The load was successful, so cache the image.
|
| base::AutoLock lock_scope(*lock_);
|
|
|
| @@ -126,7 +131,11 @@ gfx::Image& ResourceBundle::GetImageNamed(int resource_id) {
|
| if (images_.count(resource_id))
|
| return *images_[resource_id];
|
|
|
| - gfx::Image* image = new gfx::Image(bitmap.release());
|
| + std::vector<const SkBitmap*> bitmaps;
|
| + bitmaps.push_back(bitmap.release());
|
| + if (large_bitmap.get())
|
| + bitmaps.push_back(large_bitmap.release());
|
| + gfx::Image* image = new gfx::Image(bitmaps);
|
| images_[resource_id] = image;
|
| return *image;
|
| }
|
| @@ -190,6 +199,7 @@ void ResourceBundle::ReloadFonts() {
|
| ResourceBundle::ResourceBundle()
|
| : lock_(new base::Lock),
|
| resources_data_(NULL),
|
| + large_icon_resources_data_(NULL),
|
| locale_resources_data_(NULL) {
|
| }
|
|
|
|
|