surface: Simplify some code

Fold gdk_surface_process_updates_recurse into its
only caller. There is no recursion here anymore.
This commit is contained in:
Matthias Clasen 2019-03-23 09:35:14 -04:00
parent 0699b17848
commit 77e99f70fe

View File

@ -1144,22 +1144,6 @@ gdk_surface_schedule_update (GdkSurface *surface)
GDK_FRAME_CLOCK_PHASE_PAINT); GDK_FRAME_CLOCK_PHASE_PAINT);
} }
static void
gdk_surface_process_updates_recurse (GdkSurface *surface,
cairo_region_t *expose_region)
{
gboolean handled;
if (surface->destroyed)
return;
/* Paint the surface before the children, clipped to the surface region */
g_signal_emit (surface, signals[RENDER], 0, expose_region, &handled);
}
/* Process and remove any invalid area on the native surface by creating
* expose events for the surface and all non-native descendants.
*/
static void static void
gdk_surface_process_updates_internal (GdkSurface *surface) gdk_surface_process_updates_internal (GdkSurface *surface)
{ {
@ -1182,10 +1166,11 @@ gdk_surface_process_updates_internal (GdkSurface *surface)
if (gdk_surface_is_viewable (surface)) if (gdk_surface_is_viewable (surface))
{ {
cairo_region_t *expose_region; cairo_region_t *expose_region;
gboolean handled;
expose_region = cairo_region_copy (surface->active_update_area); expose_region = cairo_region_copy (surface->active_update_area);
gdk_surface_process_updates_recurse (surface, expose_region); g_signal_emit (surface, signals[RENDER], 0, expose_region, &handled);
cairo_region_destroy (expose_region); cairo_region_destroy (expose_region);
} }