[gtk+] API: Remove gdk_window_process_all_updates()



commit 2a27b7ecc6a427a39d266f7d0ac0210dd3f70688
Author: Benjamin Otte <otte redhat com>
Date:   Wed Nov 23 19:10:34 2016 +0100

    API: Remove gdk_window_process_all_updates()
    
    It's completely unused since we have a frame clock.

 docs/reference/gdk/gdk4-sections.txt |    1 -
 gdk/broadway/gdkdisplay-broadway.c   |    2 -
 gdk/broadway/gdkprivate-broadway.h   |    2 -
 gdk/broadway/gdkwindow-broadway.c    |   10 ---
 gdk/gdkdisplayprivate.h              |    3 -
 gdk/gdkwindow.c                      |  114 ----------------------------------
 gdk/mir/gdkmirdisplay.c              |   14 ----
 gdk/quartz/gdkdisplay-quartz.c       |    2 -
 gdk/quartz/gdkwindow-quartz.c        |   38 -----------
 gdk/wayland/gdkdisplay-wayland.c     |   13 ----
 gdk/win32/gdkdisplay-win32.c         |   13 ----
 gdk/x11/gdkdisplay-x11.c             |    2 -
 gdk/x11/gdkprivate-x11.h             |    2 -
 gdk/x11/gdkwindow-x11.c              |   15 -----
 14 files changed, 0 insertions(+), 231 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 4b81010..5df821e 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -351,7 +351,6 @@ gdk_window_invalidate_maybe_recurse
 gdk_window_get_update_area
 gdk_window_freeze_updates
 gdk_window_thaw_updates
-gdk_window_process_all_updates
 gdk_window_get_frame_clock
 
 <SUBSECTION>
diff --git a/gdk/broadway/gdkdisplay-broadway.c b/gdk/broadway/gdkdisplay-broadway.c
index a891e0d..8d3c76a 100644
--- a/gdk/broadway/gdkdisplay-broadway.c
+++ b/gdk/broadway/gdkdisplay-broadway.c
@@ -341,8 +341,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
   display_class->supports_cursor_alpha = _gdk_broadway_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_broadway_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = _gdk_broadway_display_before_process_all_updates;
-  display_class->after_process_all_updates = _gdk_broadway_display_after_process_all_updates;
   display_class->get_next_serial = gdk_broadway_display_get_next_serial;
   display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_broadway_display_create_window_impl;
diff --git a/gdk/broadway/gdkprivate-broadway.h b/gdk/broadway/gdkprivate-broadway.h
index c1af87c..b5710cf 100644
--- a/gdk/broadway/gdkprivate-broadway.h
+++ b/gdk/broadway/gdkprivate-broadway.h
@@ -116,8 +116,6 @@ void _gdk_broadway_display_get_default_cursor_size (GdkDisplay *display,
 void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
                                                    guint       *width,
                                                    guint       *height);
-void       _gdk_broadway_display_before_process_all_updates (GdkDisplay *display);
-void       _gdk_broadway_display_after_process_all_updates  (GdkDisplay *display);
 void       _gdk_broadway_display_create_window_impl     (GdkDisplay    *display,
                                                         GdkWindow     *window,
                                                         GdkWindow     *real_parent,
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index 1ddc444..1271616 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -1492,16 +1492,6 @@ gdk_broadway_window_set_opacity (GdkWindow *window,
     opacity = 1;
 }
 
-void
-_gdk_broadway_display_before_process_all_updates (GdkDisplay *display)
-{
-}
-
-void
-_gdk_broadway_display_after_process_all_updates (GdkDisplay *display)
-{
-}
-
 guint32
 gdk_broadway_get_last_seen_time (GdkWindow  *window)
 {
diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h
index a9fce70..5664776 100644
--- a/gdk/gdkdisplayprivate.h
+++ b/gdk/gdkdisplayprivate.h
@@ -178,9 +178,6 @@ struct _GdkDisplayClass
 
   GdkAppLaunchContext *      (*get_app_launch_context) (GdkDisplay *display);
 
-  void                       (*before_process_all_updates) (GdkDisplay *display);
-  void                       (*after_process_all_updates)  (GdkDisplay *display);
-
   gulong                     (*get_next_serial) (GdkDisplay *display);
 
   void                       (*notify_startup_complete) (GdkDisplay  *display,
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 07aff2a..7d3804e 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3510,120 +3510,6 @@ gdk_window_process_updates_internal (GdkWindow *window)
   g_object_unref (window);
 }
 
-static void
-flush_all_displays (void)
-{
-  GSList *displays, *l;
-
-  displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
-  for (l = displays; l; l = l->next)
-    gdk_display_flush (l->data);
-
-  g_slist_free (displays);
-}
-
-static void
-before_process_all_updates (void)
-{
-  GSList *displays, *l;
-  GdkDisplayClass *display_class;
-
-  displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
-  display_class = GDK_DISPLAY_GET_CLASS (displays->data);
-  for (l = displays; l; l = l->next)
-    display_class->before_process_all_updates (l->data);
-
-  g_slist_free (displays);
-}
-
-static void
-after_process_all_updates (void)
-{
-  GSList *displays, *l;
-  GdkDisplayClass *display_class;
-
-  displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
-  display_class = GDK_DISPLAY_GET_CLASS (displays->data);
-  for (l = displays; l; l = l->next)
-    display_class->after_process_all_updates (l->data);
-
-  g_slist_free (displays);
-}
-
-/* Currently it is not possible to override
- * gdk_window_process_all_updates in the same manner as
- * gdk_window_process_updates and gdk_window_invalidate_maybe_recurse
- * by implementing the GdkPaintable interface.  If in the future a
- * backend would need this, the right solution would be to add a
- * method to GdkDisplay that can be optionally
- * NULL. gdk_window_process_all_updates can then walk the list of open
- * displays and call the mehod.
- */
-
-/**
- * gdk_window_process_all_updates:
- *
- * Calls gdk_window_process_updates() for all windows (see #GdkWindow)
- * in the application.
- *
- **/
-void
-gdk_window_process_all_updates (void)
-{
-  GSList *old_update_windows = update_windows;
-  GSList *tmp_list = update_windows;
-  static gboolean in_process_all_updates = FALSE;
-  static gboolean got_recursive_update = FALSE;
-
-  if (in_process_all_updates)
-    {
-      /* We can't do this now since that would recurse, so
-        delay it until after the recursion is done. */
-      got_recursive_update = TRUE;
-      return;
-    }
-
-  in_process_all_updates = TRUE;
-  got_recursive_update = FALSE;
-
-  update_windows = NULL;
-
-  before_process_all_updates ();
-
-  while (tmp_list)
-    {
-      GdkWindow *window = tmp_list->data;
-
-      if (!GDK_WINDOW_DESTROYED (window))
-       {
-         if (window->update_freeze_count ||
-             gdk_window_is_toplevel_frozen (window))
-           gdk_window_add_update_window (window);
-         else
-           gdk_window_process_updates_internal (window);
-       }
-
-      g_object_unref (window);
-      tmp_list = tmp_list->next;
-    }
-
-  g_slist_free (old_update_windows);
-
-  flush_all_displays ();
-
-  after_process_all_updates ();
-
-  in_process_all_updates = FALSE;
-
-  /* If we ignored a recursive call, schedule a
-     redraw now so that it eventually happens,
-     otherwise we could miss an update if nothing
-     else schedules an update. */
-  if (got_recursive_update)
-    gdk_window_schedule_update (NULL);
-}
-
-
 enum {
   PROCESS_UPDATES_NO_RECURSE,
   PROCESS_UPDATES_WITH_ALL_CHILDREN,
diff --git a/gdk/mir/gdkmirdisplay.c b/gdk/mir/gdkmirdisplay.c
index c42962e..0427dc3 100644
--- a/gdk/mir/gdkmirdisplay.c
+++ b/gdk/mir/gdkmirdisplay.c
@@ -361,18 +361,6 @@ gdk_mir_display_get_app_launch_context (GdkDisplay *display)
   return NULL;
 }
 
-static void
-gdk_mir_display_before_process_all_updates (GdkDisplay *display)
-{
-  //g_printerr ("gdk_mir_display_before_process_all_updates\n");
-}
-
-static void
-gdk_mir_display_after_process_all_updates (GdkDisplay *display)
-{
-  //g_printerr ("gdk_mir_display_after_process_all_updates\n");
-}
-
 static gulong
 gdk_mir_display_get_next_serial (GdkDisplay *display)
 {
@@ -737,8 +725,6 @@ gdk_mir_display_class_init (GdkMirDisplayClass *klass)
   display_class->get_cursor_for_name = gdk_mir_display_get_cursor_for_name;
   display_class->get_cursor_for_surface = gdk_mir_display_get_cursor_for_surface;
   display_class->get_app_launch_context = gdk_mir_display_get_app_launch_context;
-  display_class->before_process_all_updates = gdk_mir_display_before_process_all_updates;
-  display_class->after_process_all_updates = gdk_mir_display_after_process_all_updates;
   display_class->get_next_serial = gdk_mir_display_get_next_serial;
   display_class->notify_startup_complete = gdk_mir_display_notify_startup_complete;
   display_class->create_window_impl = gdk_mir_display_create_window_impl;
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index b24fdff..ebef514 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -244,8 +244,6 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
   display_class->supports_cursor_alpha = _gdk_quartz_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_quartz_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = _gdk_quartz_display_before_process_all_updates;
-  display_class->after_process_all_updates = _gdk_quartz_display_after_process_all_updates;
   display_class->get_next_serial = gdk_quartz_display_get_next_serial;
   display_class->notify_startup_complete = gdk_quartz_display_notify_startup_complete;
   display_class->event_data_copy = _gdk_quartz_display_event_data_copy;
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 1c548cc..ae2ca22 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -400,44 +400,6 @@ _gdk_quartz_window_process_updates_recurse (GdkWindow *window,
    */
 }
 
-void
-_gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
-{
-  in_process_all_updates = TRUE;
-
-  NSDisableScreenUpdates ();
-}
-
-void
-_gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
-{
-  GSList *old_update_nswindows = update_nswindows;
-  GSList *tmp_list = update_nswindows;
-
-  update_nswindows = NULL;
-
-  while (tmp_list)
-    {
-      NSWindow *nswindow = tmp_list->data;
-
-      [[nswindow contentView] displayIfNeeded];
-
-      _gdk_quartz_window_flush (NULL);
-
-      [nswindow enableFlushWindow];
-      [nswindow flushWindow];
-      [nswindow release];
-
-      tmp_list = tmp_list->next;
-    }
-
-  g_slist_free (old_update_nswindows);
-
-  in_process_all_updates = FALSE;
-
-  NSEnableScreenUpdates ();
-}
-
 static const gchar *
 get_default_title (void)
 {
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 2ed7d27..3486748 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -772,17 +772,6 @@ gdk_wayland_display_supports_input_shapes (GdkDisplay *display)
   return TRUE;
 }
 
-static void
-gdk_wayland_display_before_process_all_updates (GdkDisplay *display)
-{
-}
-
-static void
-gdk_wayland_display_after_process_all_updates (GdkDisplay *display)
-{
-  /* Post the damage here instead? */
-}
-
 static gulong
 gdk_wayland_display_get_next_serial (GdkDisplay *display)
 {
@@ -952,8 +941,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
   display_class->get_cursor_for_surface = _gdk_wayland_display_get_cursor_for_surface;
   display_class->supports_cursor_alpha = _gdk_wayland_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_wayland_display_supports_cursor_color;
-  display_class->before_process_all_updates = gdk_wayland_display_before_process_all_updates;
-  display_class->after_process_all_updates = gdk_wayland_display_after_process_all_updates;
   display_class->get_next_serial = gdk_wayland_display_get_next_serial;
   display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_wayland_display_create_window_impl;
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index c701e2e..03eabd8 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1091,17 +1091,6 @@ gdk_win32_display_check_composited (GdkWin32Display *display)
 }
 
 static void
-gdk_win32_display_before_process_all_updates (GdkDisplay  *display)
-{
-  /* nothing */
-}
-static void
-gdk_win32_display_after_process_all_updates (GdkDisplay  *display)
-{
-  /* nothing */
-}
-
-static void
 gdk_win32_display_notify_startup_complete (GdkDisplay  *display,
                                            const gchar *startup_id)
 {
@@ -1273,8 +1262,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
   display_class->supports_cursor_alpha = _gdk_win32_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_win32_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = gdk_win32_display_before_process_all_updates;
-  display_class->after_process_all_updates = gdk_win32_display_after_process_all_updates;
   display_class->get_next_serial = gdk_win32_display_get_next_serial;
   display_class->notify_startup_complete = gdk_win32_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_win32_display_create_window_impl;
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index cca0b65..843cdc8 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -2976,8 +2976,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
   display_class->supports_cursor_alpha = _gdk_x11_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_x11_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = _gdk_x11_display_before_process_all_updates;
-  display_class->after_process_all_updates = _gdk_x11_display_after_process_all_updates;
   display_class->get_next_serial = gdk_x11_display_get_next_serial;
   display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_x11_display_create_window_impl;
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index 15e1170..e785af4 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -265,8 +265,6 @@ void       _gdk_x11_display_get_default_cursor_size (GdkDisplay *display,
 void       _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display,
                                                      guint      *width,
                                                      guint      *height);
-void       _gdk_x11_display_before_process_all_updates (GdkDisplay *display);
-void       _gdk_x11_display_after_process_all_updates  (GdkDisplay *display);
 void       _gdk_x11_display_create_window_impl     (GdkDisplay    *display,
                                                     GdkWindow     *window,
                                                     GdkWindow     *real_parent,
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 998d302..204e562 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -5094,21 +5094,6 @@ gdk_x11_window_set_opacity (GdkWindow *window,
                     (guchar *) &cardinal, 1);
 }
 
-void
-_gdk_x11_display_before_process_all_updates (GdkDisplay *display)
-{
-}
-
-void
-_gdk_x11_display_after_process_all_updates (GdkDisplay *display)
-{
-  /* Sync after all drawing, otherwise the client can get "ahead" of
-     the server rendering during animations, such that we fill up
-     the Xserver pipes with sync rendering ops not letting other
-     clients (including the VM) do anything. */
-  XSync (GDK_DISPLAY_XDISPLAY (display), FALSE);
-}
-
 static Bool
 timestamp_predicate (Display *display,
                     XEvent  *xevent,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]