1
0
Fork 0

frames.c: Make cached_pixels_draw() take a cairo_t

This basically just moves the creation of the cairo_t out of the
function. It is done in preparation for GTK3.

https://bugzilla.gnome.org/show_bug.cgi?id=630203
This commit is contained in:
Benjamin Otte 2010-09-24 12:53:04 +02:00
parent 1c31e8ffc2
commit e75abacec6

View file

@ -2254,15 +2254,12 @@ subtract_client_area (MetaRegion *region, MetaUIFrame *frame)
static void
cached_pixels_draw (CachedPixels *pixels,
GdkWindow *window,
cairo_t *cr,
MetaRegion *region)
{
MetaRegion *region_piece;
cairo_t *cr;
int i;
cr = gdk_cairo_create (window);
for (i = 0; i < 4; i++)
{
CachedFramePiece *piece;
@ -2279,8 +2276,6 @@ cached_pixels_draw (CachedPixels *pixels,
meta_region_destroy (region_piece);
}
}
cairo_destroy (cr);
}
static gboolean
@ -2314,7 +2309,9 @@ meta_frames_expose_event (GtkWidget *widget,
pixels = get_cache (frames, frame);
cached_pixels_draw (pixels, frame->window, region);
cr = gdk_cairo_create (event->window);
cached_pixels_draw (pixels, cr, region);
cairo_destroy (cr);
clip_to_screen (region, frame);
subtract_client_area (region, frame);