Move GdkWindowRegionMove construction/destruction to separate functions

This commit is contained in:
Alexander Larsson 2009-02-08 13:17:37 +01:00 committed by Alexander Larsson
parent 3866ea0539
commit e4b26d3231

View File

@ -2537,10 +2537,9 @@ do_move_region_bits_on_impl (GdkWindowObject *impl_window,
gdk_gc_set_clip_region (tmp_gc, NULL);
}
static void
append_move_region (GdkWindowObject *impl_window,
GdkRegion *region,
int dx, int dy)
static GdkWindowRegionMove *
gdk_window_region_move_new (GdkRegion *region,
int dx, int dy)
{
GdkWindowRegionMove *move;
@ -2549,6 +2548,25 @@ append_move_region (GdkWindowObject *impl_window,
move->dx = dx;
move->dy = dy;
return move;
}
static void
gdk_window_region_move_free (GdkWindowRegionMove *move)
{
gdk_region_destroy (move->dest_region);
g_slice_free (GdkWindowRegionMove, move);
}
static void
append_move_region (GdkWindowObject *impl_window,
GdkRegion *region,
int dx, int dy)
{
GdkWindowRegionMove *move;
move = gdk_window_region_move_new (region, dx, dy);
impl_window->outstanding_moves =
g_list_append (impl_window->outstanding_moves, move);
}
@ -2613,8 +2631,7 @@ gdk_window_flush_outstanding_moves (GdkWindow *window)
do_move_region_bits_on_impl (impl_window,
move->dest_region, move->dx, move->dy);
gdk_region_destroy (move->dest_region);
g_slice_free (GdkWindowRegionMove, move);
gdk_window_region_move_free (move);
}
g_list_free (impl_window->outstanding_moves);