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

Unified Diff: chrome/browser/ui/gtk/gtk_util.cc

Issue 8866002: GTK: Stamp out GtkThemeService::GetSurfaceNamed(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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/ui/gtk/gtk_theme_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_util.cc
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index 33855f9b9959cd85d4deb15f36d994b80dc712c5..43c3bac1f0189b7bba2a65b7c75412621074c023 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -801,9 +801,10 @@ void DrawThemedToolbarBackground(GtkWidget* widget,
// The toolbar is supposed to blend in with the active tab, so we have to pass
// coordinates for the IDR_THEME_TOOLBAR bitmap relative to the top of the
// tab strip.
- gfx::CairoCachedSurface* background = theme_service->GetSurfaceNamed(
- IDR_THEME_TOOLBAR, widget);
- background->SetSource(cr, widget, tabstrip_origin.x(), tabstrip_origin.y());
+ const gfx::Image* background =
+ theme_service->GetImageNamed(IDR_THEME_TOOLBAR);
+ background->ToCairo()->SetSource(cr, widget,
+ tabstrip_origin.x(), tabstrip_origin.y());
// We tile the toolbar background in both directions.
cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
cairo_rectangle(cr,
« no previous file with comments | « chrome/browser/ui/gtk/gtk_theme_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698