summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 21:20:35 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 21:20:35 +0000
commit556f790a4e67f95023bdd55dcf2acab48b9f16ac (patch)
tree76002ed895bd3272405edd660b2ff6e358f22cfe
parent936f8faf45d8247c6a6838bbb355130f5164c2a5 (diff)
downloadchromium_src-556f790a4e67f95023bdd55dcf2acab48b9f16ac.zip
chromium_src-556f790a4e67f95023bdd55dcf2acab48b9f16ac.tar.gz
chromium_src-556f790a4e67f95023bdd55dcf2acab48b9f16ac.tar.bz2
Linux: don't use static ChromeFont objects
With Darin's change (12485) we now have huge library trees from almost every target. This is breaking because the static ChromeFont is entering Skia before Skia has been constructed. This will only bite us in the future if we have static ChromeFont objects. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12908 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc8
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
index 498d3d6..7331c14 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -56,7 +56,7 @@ TabRendererGtk::TabImage TabRendererGtk::tab_inactive_otr_ = {0};
TabRendererGtk::TabImage TabRendererGtk::tab_hover_ = {0};
TabRendererGtk::ButtonImage TabRendererGtk::close_button_ = {0};
TabRendererGtk::ButtonImage TabRendererGtk::newtab_button_ = {0};
-ChromeFont TabRendererGtk::title_font_;
+ChromeFont* TabRendererGtk::title_font_ = NULL;
int TabRendererGtk::title_font_height_ = 0;
SkBitmap* TabRendererGtk::download_icon_ = NULL;
int TabRendererGtk::download_icon_width_ = 0;
@@ -231,7 +231,7 @@ void TabRendererGtk::Paint(ChromeCanvasPaint* canvas) {
SkColor title_color = IsSelected() ? kSelectedTitleColor
: kUnselectedTitleColor;
- canvas->DrawStringInt(title, title_font_, title_color, title_bounds_.x(),
+ canvas->DrawStringInt(title, *title_font_, title_color, title_bounds_.x(),
title_bounds_.y(), title_bounds_.width(),
title_bounds_.height());
@@ -374,8 +374,8 @@ void TabRendererGtk::InitResources() {
LoadTabImages();
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- title_font_ = rb.GetFont(ResourceBundle::BaseFont);
- title_font_height_ = title_font_.height();
+ title_font_ = new ChromeFont(rb.GetFont(ResourceBundle::BaseFont));
+ title_font_height_ = title_font_->height();
initialized_ = true;
}
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
index a79b7b2..6a187d8 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.h
@@ -136,7 +136,7 @@ class TabRendererGtk {
static ButtonImage close_button_;
static ButtonImage newtab_button_;
- static ChromeFont title_font_;
+ static ChromeFont* title_font_;
static int title_font_height_;
static SkBitmap* download_icon_;