| Index: ui/base/resource/resource_bundle_mac.mm
|
| diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm
|
| index e859b1c09e607d16aa9b2ce4433be68331ff7af0..f7bc0f8c00bef7c26c554a031559f814c92afa3c 100644
|
| --- a/ui/base/resource/resource_bundle_mac.mm
|
| +++ b/ui/base/resource/resource_bundle_mac.mm
|
| @@ -58,15 +58,11 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) {
|
| return GetResourcesPakFilePath(@"locale", mac_locale);
|
| }
|
|
|
| -NSImage* ResourceBundle::GetNSImageNamed(int resource_id) {
|
| - // Currently this doesn't make a cache holding these as NSImages because
|
| - // GetBitmapNamed has a cache, and we don't want to double cache.
|
| - SkBitmap* bitmap = GetBitmapNamed(resource_id);
|
| - if (!bitmap)
|
| - return nil;
|
| -
|
| - NSImage* nsimage = gfx::SkBitmapToNSImage(*bitmap);
|
| - return nsimage;
|
| +gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) {
|
| + // Currently this just returns the Skia-backed image, which will convert to
|
| + // NSImage and cache that result when necessary.
|
| + // TODO(rsesek): Load the raw bytes directly into an NSImage instead.
|
| + return GetImageNamed(resource_id);
|
| }
|
|
|
| } // namespace ui
|
|
|