summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_view.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 21:46:47 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 21:46:47 +0000
commitcfd0b58808dcf60b03a2fa434b655f850087c5f4 (patch)
tree026ad375656d31efedf609a3877af2eb7a8bbd57 /chrome/browser/cocoa/tab_view.mm
parentc2def1c60e5809cf6f6171f980c56f2e4b48109e (diff)
downloadchromium_src-cfd0b58808dcf60b03a2fa434b655f850087c5f4.zip
chromium_src-cfd0b58808dcf60b03a2fa434b655f850087c5f4.tar.gz
chromium_src-cfd0b58808dcf60b03a2fa434b655f850087c5f4.tar.bz2
Aggressively cache theme image pattern colors.
BUG=http://crbug.com/37106 (I hope) TEST=no visible change, just faster Review URL: http://codereview.chromium.org/661396 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_view.mm')
-rw-r--r--chrome/browser/cocoa/tab_view.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/tab_view.mm b/chrome/browser/cocoa/tab_view.mm
index cc2df73..a05d059 100644
--- a/chrome/browser/cocoa/tab_view.mm
+++ b/chrome/browser/cocoa/tab_view.mm
@@ -662,12 +662,12 @@ const CGFloat kRapidCloseDist = 2.5;
(themeProvider->HasCustomImage(IDR_THEME_TAB_BACKGROUND) ||
themeProvider->HasCustomImage(IDR_THEME_FRAME));
- NSImage* backgroundImage =
+ NSColor* backgroundImageColor =
hasBackgroundImage ?
- themeProvider->GetNSImageNamed(IDR_THEME_TAB_BACKGROUND, true) :
+ themeProvider->GetNSImageColorNamed(IDR_THEME_TAB_BACKGROUND, true) :
nil;
- if (backgroundImage) {
- [[NSColor colorWithPatternImage:backgroundImage] set];
+ if (backgroundImageColor) {
+ [backgroundImageColor set];
[path fill];
} else {
[[NSColor windowBackgroundColor] set];