Index: chrome/browser/ui/gtk/cairo_cached_surface.h |
diff --git a/chrome/browser/ui/gtk/cairo_cached_surface.h b/chrome/browser/ui/gtk/cairo_cached_surface.h |
index 8894ee1a372a5c46497e7cb5c136591b3b5715b5..eb481e84cde2d3bbdcba797df23b2de091facb3f 100644 |
--- a/chrome/browser/ui/gtk/cairo_cached_surface.h |
+++ b/chrome/browser/ui/gtk/cairo_cached_surface.h |
@@ -30,6 +30,9 @@ class CairoCachedSurface { |
return pixbuf_; |
} |
+ // Delete all our data. |
+ void Reset(); |
+ |
// The dimensions of the underlying pixbuf/surface. (or -1 if invalid.) |
int Width() const; |
int Height() const; |
@@ -44,11 +47,18 @@ class CairoCachedSurface { |
// case we don't have an X backed surface cached. |
void SetSource(cairo_t* cr, int x, int y); |
+ // Performs a mask operation, using this surface as the alpha channel. |
+ void MaskSource(cairo_t* cr, int x, int y); |
+ |
// Raw access to the pixbuf. May be NULL. Used for a few gdk operations |
// regarding window shaping. |
GdkPixbuf* pixbuf() { return pixbuf_; } |
private: |
+ // Makes sure |surface_| is a valid thing that lives on the X server, |
+ // uploading it if necessary. |
+ void EnsureSurfaceValid(cairo_t* cr); |
+ |
// The source pixbuf. |
GdkPixbuf* pixbuf_; |