From: Benjamin Otte Date: Sat, 22 Apr 2023 14:27:27 +0000 (+0200) Subject: surface: Stop maintaining an unused linked list X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~382^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=be0ed15b40cf2090feeb65a4c5916e251504136c;p=gtk4.git surface: Stop maintaining an unused linked list wat? --- diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 2de27870cc..d34fbf3519 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -1270,40 +1270,6 @@ gdk_surface_create_vulkan_context (GdkSurface *surface, NULL); } -/* Code for dirty-region queueing - */ -static GSList *update_surfaces = NULL; - -static void -gdk_surface_add_update_surface (GdkSurface *surface) -{ - GSList *tmp; - - /* Check whether "surface" is already in "update_surfaces" list. - * It could be added during execution of gtk_widget_destroy() when - * setting focus widget to NULL and redrawing old focus widget. - * See bug 711552. - */ - tmp = g_slist_find (update_surfaces, surface); - if (tmp != NULL) - return; - - update_surfaces = g_slist_prepend (update_surfaces, g_object_ref (surface)); -} - -static void -gdk_surface_remove_update_surface (GdkSurface *surface) -{ - GSList *link; - - link = g_slist_find (update_surfaces, surface); - if (link != NULL) - { - update_surfaces = g_slist_delete_link (update_surfaces, link); - g_object_unref (surface); - } -} - static gboolean gdk_surface_is_toplevel_frozen (GdkSurface *surface) { @@ -1433,7 +1399,6 @@ gdk_surface_paint_on_clock (GdkFrameClock *clock, { surface->pending_phases &= ~GDK_FRAME_CLOCK_PHASE_PAINT; gdk_surface_process_updates_internal (surface); - gdk_surface_remove_update_surface (surface); } g_object_unref (surface); @@ -1484,7 +1449,6 @@ impl_surface_add_update_area (GdkSurface *impl_surface, cairo_region_union (impl_surface->update_area, region); else { - gdk_surface_add_update_surface (impl_surface); impl_surface->update_area = cairo_region_copy (region); gdk_surface_schedule_update (impl_surface); } @@ -1568,8 +1532,6 @@ _gdk_surface_clear_update_area (GdkSurface *surface) if (surface->update_area) { - gdk_surface_remove_update_surface (surface); - cairo_region_destroy (surface->update_area); surface->update_area = NULL; }