API: Remove gdk_window_process_all_updates()

It's completely unused since we have a frame clock.
This commit is contained in:
Benjamin Otte 2016-11-23 19:10:34 +01:00
parent ef75ca2d53
commit 2a27b7ecc6
14 changed files with 0 additions and 231 deletions

View File

@ -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>

View File

@ -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;

View File

@ -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,

View File

@ -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)
{

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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)
{

View File

@ -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;

View File

@ -1090,17 +1090,6 @@ gdk_win32_display_check_composited (GdkWin32Display *display)
gdk_display_set_composited (GDK_DISPLAY (display), composited);
}
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;

View File

@ -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;

View File

@ -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,

View File

@ -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,