Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3459)

Unified Diff: chrome/browser/gtk/gtk_theme_provider.cc

Issue 200071: Revert "Upload GdkPixbufs into cairo surfaces so they (hopefully) live on the X (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/gtk_theme_provider.h ('k') | chrome/browser/gtk/toolbar_star_toggle_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 e705eb03b062fa25711a8a2783d1ce550457d011..6b37ed5410eeb5a415ffab64c8b5d2b5a1a8f393 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,
« no previous file with comments | « chrome/browser/gtk/gtk_theme_provider.h ('k') | chrome/browser/gtk/toolbar_star_toggle_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698