From 6230e20618e551669580a27cb9e2cd1af7f83d46 Mon Sep 17 00:00:00 2001 From: "erg@google.com" Date: Thu, 10 Sep 2009 01:12:19 +0000 Subject: Revert "Upload GdkPixbufs into cairo surfaces so they (hopefully) live on the X server and have better performance. In the presence of XRender, let cairo do things smarter." Valgrind problems. This reverts commit 03871714c3e5b39ee0f8369ecc2313c02fe0ca08 (r25814). Review URL: http://codereview.chromium.org/200071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25828 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gtk/gtk_theme_provider.cc | 33 -------------------------------- 1 file changed, 33 deletions(-) (limited to 'chrome/browser/gtk/gtk_theme_provider.cc') diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc index e705eb0..6b37ed5 100644 --- a/chrome/browser/gtk/gtk_theme_provider.cc +++ b/chrome/browser/gtk/gtk_theme_provider.cc @@ -9,7 +9,6 @@ #include "base/gfx/gtk_util.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/profile.h" -#include "chrome/browser/gtk/cairo_cached_surface.h" #include "chrome/browser/gtk/gtk_chrome_button.h" #include "chrome/common/pref_names.h" #include "chrome/common/notification_details.h" @@ -164,25 +163,6 @@ GdkColor GtkThemeProvider::GetBorderColor() { return color; } -CairoCachedSurface* GtkThemeProvider::GetSurfaceNamed( - int id, GtkWidget* widget_on_display) { - GdkDisplay* display = gtk_widget_get_display(widget_on_display); - CairoCachedSurfaceMap& surface_map = per_display_surfaces_[display]; - - // Check to see if we already have the pixbuf in the cache. - CairoCachedSurfaceMap::const_iterator found = surface_map.find(id); - if (found != surface_map.end()) - return found->second; - - GdkPixbuf* pixbuf = GetPixbufNamed(id); - CairoCachedSurface* surface = new CairoCachedSurface; - surface->UsePixbuf(pixbuf); - - surface_map[id] = surface; - - return surface; -} - void GtkThemeProvider::LoadThemePrefs() { if (use_gtk_) { LoadGtkValues(); @@ -228,19 +208,6 @@ void GtkThemeProvider::SaveThemeBitmap(const std::string resource_name, } } -void GtkThemeProvider::FreePlatformCaches() { - BrowserThemeProvider::FreePlatformCaches(); - - for (PerDisplaySurfaceMap::iterator it = per_display_surfaces_.begin(); - it != per_display_surfaces_.end(); ++it) { - for (CairoCachedSurfaceMap::iterator jt = it->second.begin(); - jt != it->second.end(); ++jt) { - delete jt->second; - } - } - per_display_surfaces_.clear(); -} - // static void GtkThemeProvider::OnStyleSet(GtkWidget* widget, GtkStyle* previous_style, -- cgit v1.1