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

Unified Diff: chrome/browser/gtk/custom_button.h

Issue 199077: Reapplies the GdkPixbuf -> cairo surface patch. (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/cairo_cached_surface.cc ('k') | chrome/browser/gtk/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/custom_button.h
diff --git a/chrome/browser/gtk/custom_button.h b/chrome/browser/gtk/custom_button.h
index 768b4cabca22a78150fe761c1e669e6807264517..27dc275eea84e7c225d1498a27622d37ba2d8c01 100644
--- a/chrome/browser/gtk/custom_button.h
+++ b/chrome/browser/gtk/custom_button.h
@@ -16,6 +16,7 @@
#include "chrome/common/owned_widget_gtk.h"
#include "third_party/skia/include/core/SkBitmap.h"
+class CairoCachedSurface;
class GtkThemeProvider;
// These classes implement two kinds of custom-drawn buttons. They're
@@ -36,7 +37,9 @@ class CustomDrawButtonBase : public NotificationObserver {
~CustomDrawButtonBase();
- GdkPixbuf* pixbufs(int i) const { return pixbufs_[i]; }
+ // Returns the dimensions of the first surface.
+ int Width() const;
+ int Height() const;
gboolean OnExpose(GtkWidget* widget, GdkEventExpose* e);
@@ -52,12 +55,12 @@ class CustomDrawButtonBase : public NotificationObserver {
const NotificationDetails& details);
private:
- // We store one GdkPixbuf* for each possible state of the button;
+ // We store one surface for each possible state of the button;
// INSENSITIVE is the last available state;
- GdkPixbuf* pixbufs_[GTK_STATE_INSENSITIVE + 1];
+ scoped_ptr<CairoCachedSurface> surfaces_[GTK_STATE_INSENSITIVE + 1];
// The background image.
- GdkPixbuf* background_image_;
+ scoped_ptr<CairoCachedSurface> background_image_;
// If non-negative, the state to paint the button.
int paint_override_;
« no previous file with comments | « chrome/browser/gtk/cairo_cached_surface.cc ('k') | chrome/browser/gtk/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698