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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h

Issue 18486007: Fix the misalignment on CrOS of the tab background images (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
Index: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
index 0ab3baee479f8632fa554f1e216c2453e3dda388..f6313874b1e5f4278c4cf59cfa4df8439d2d3f3b 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h
@@ -313,13 +313,18 @@ class TabRendererGtk : public ui::AnimationDelegate,
void PaintActiveTabBackground(GtkWidget* widget, cairo_t* cr);
void PaintLoadingAnimation(GtkWidget* widget, cairo_t* cairo);
- // Draws the given |tab_bg| onto |cr| using the tab shape masks along the
- // sides for the rounded tab shape.
- void DrawTabBackground(cairo_t* cr,
- GtkWidget* widget,
- const gfx::Image& tab_bg,
- int offset_x,
- int offset_y);
+ // Sets the tab background image as the source pattern within |cr|. |bounds|
+ // are the bounds of the source pattern which will be used.
+ // The tab background source pattern is generated based on whether the tab
+ // is active, whether the tab is in an incognito browser and on the current
+ // theme.
+ void SetTabBackgroundImageAsSource(cairo_t* cr,
+ GtkWidget* widget,
+ const gfx::Rect& bounds);
+
+ // Draws the tab background image onto |cr| using the tab shape masks along
+ // the sides for the rounded tab shape.
+ void DrawTabBackground(cairo_t* cr, GtkWidget* widget);
// Draws the tab shadow using the given idr resources onto |cr|.
void DrawTabShadow(cairo_t* cr,

Powered by Google App Engine
This is Rietveld 408576698