gdkwindow: Remove extra arguments from process_updates_recurse_helper

These can easily be calculated inside the function.
This commit is contained in:
Jasper St. Pierre 2014-06-23 16:15:48 -04:00
parent 70fe57703b
commit e67e8ebb30

View File

@ -3239,8 +3239,7 @@ gdk_window_add_damage (GdkWindow *toplevel,
static void static void
_gdk_window_process_updates_recurse_helper (GdkWindow *window, _gdk_window_process_updates_recurse_helper (GdkWindow *window,
cairo_region_t *expose_region, cairo_region_t *expose_region)
int dx, int dy)
{ {
GdkWindow *child; GdkWindow *child;
cairo_region_t *clipped_expose_region; cairo_region_t *clipped_expose_region;
@ -3253,7 +3252,10 @@ _gdk_window_process_updates_recurse_helper (GdkWindow *window,
return; return;
clipped_expose_region = cairo_region_copy (expose_region); clipped_expose_region = cairo_region_copy (expose_region);
cairo_region_translate (clipped_expose_region, dx, dy);
if (!gdk_window_has_impl (window))
cairo_region_translate (clipped_expose_region, -window->x, -window->y);
cairo_region_intersect (clipped_expose_region, window->clip_region); cairo_region_intersect (clipped_expose_region, window->clip_region);
if (cairo_region_is_empty (clipped_expose_region)) if (cairo_region_is_empty (clipped_expose_region))
@ -3305,7 +3307,7 @@ _gdk_window_process_updates_recurse_helper (GdkWindow *window,
/* Client side child, expose */ /* Client side child, expose */
if (child->impl == window->impl) if (child->impl == window->impl)
_gdk_window_process_updates_recurse_helper ((GdkWindow *)child, clipped_expose_region, -child->x, -child->y); _gdk_window_process_updates_recurse_helper ((GdkWindow *)child, clipped_expose_region);
} }
g_list_free_full (children, g_object_unref); g_list_free_full (children, g_object_unref);
@ -3318,7 +3320,7 @@ void
_gdk_window_process_updates_recurse (GdkWindow *window, _gdk_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *expose_region) cairo_region_t *expose_region)
{ {
_gdk_window_process_updates_recurse_helper (window, expose_region, 0, 0); _gdk_window_process_updates_recurse_helper (window, expose_region);
} }