diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 20:53:41 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-22 20:53:41 +0000 |
commit | c6ed21c4291e11007cae2dc946256faac1b36188 (patch) | |
tree | 326d91d92dfd4358814b12c8091b806dc9393b12 /chrome/browser/themes | |
parent | 930c66b72e00d1b1a0b6e12bf1b9ca81c6b58b33 (diff) | |
download | chromium_src-c6ed21c4291e11007cae2dc946256faac1b36188.zip chromium_src-c6ed21c4291e11007cae2dc946256faac1b36188.tar.gz chromium_src-c6ed21c4291e11007cae2dc946256faac1b36188.tar.bz2 |
Revert due to NSImageRepToSkBitmap failure on MAC
Revert 82688 - Use large icon resource pakThis is a part of r82185 that was reverted. The change was reverted because it caused a performance regression.In r82538 and r82584 I re-checked in code to split high-res icons into a seperate resource pak and load it.This change adds code to actually use use the high-res icons.BUG=NoneTEST=NoneReview URL: http://codereview.chromium.org/6897013
TBR=sail@chromium.org
Review URL: http://codereview.chromium.org/6896034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82704 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/themes')
-rw-r--r-- | chrome/browser/themes/theme_service_mac.mm | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm index 73fd814..30d359e 100644 --- a/chrome/browser/themes/theme_service_mac.mm +++ b/chrome/browser/themes/theme_service_mac.mm @@ -10,9 +10,7 @@ #include "chrome/browser/themes/browser_theme_pack.h" #include "skia/ext/skia_utils_mac.h" #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" -#include "ui/base/resource/resource_bundle.h" #include "ui/gfx/color_utils.h" -#include "ui/gfx/image.h" NSString* const kBrowserThemeDidChangeNotification = @"BrowserThemeDidChangeNotification"; @@ -46,18 +44,8 @@ NSImage* ThemeService::GetNSImageNamed(int id, bool allow_default) const { // SkBitmap > native conversion? // - For consistency with other platforms. // - To get the generated tinted images. - NSImage* nsimage = nil; - if (theme_pack_.get()) { - SkBitmap* bitmap = theme_pack_->GetBitmapNamed(id); - if (bitmap) - nsimage = gfx::SkBitmapToNSImage(*bitmap); - } - - // If the theme didn't override this image then load it from the resource - // bundle. - if (!nsimage) { - nsimage = rb_.GetNativeImageNamed(id); - } + SkBitmap* bitmap = GetBitmapNamed(id); + NSImage* nsimage = gfx::SkBitmapToNSImage(*bitmap); // We loaded successfully. Cache the image. if (nsimage) { |