mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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:
parent
1c31e8ffc2
commit
e75abacec6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user