[gtk/wip/matthiasc/popup5: 34/75] surface: Simplify some code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 34/75] surface: Simplify some code
- Date: Mon, 29 Apr 2019 19:44:47 +0000 (UTC)
commit 41e3d324046e32d2bb1234ae3999123a5fcc149e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 23 09:35:14 2019 -0400
surface: Simplify some code
Fold gdk_surface_process_updates_recurse into its
only caller. There is no recursion here anymore.
gdk/gdksurface.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 0f794ff454..ed49920ee5 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -1126,22 +1126,6 @@ gdk_surface_schedule_update (GdkSurface *surface)
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
gdk_surface_process_updates_internal (GdkSurface *surface)
{
@@ -1164,10 +1148,11 @@ gdk_surface_process_updates_internal (GdkSurface *surface)
if (gdk_surface_is_viewable (surface))
{
cairo_region_t *expose_region;
+ gboolean handled;
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]