From 47b21b3547775baaec51f10aa7ef3d77ea093803 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 24 Apr 2013 16:49:06 -0400 Subject: [PATCH] Use new clutter_stage_set_paint_callback() function for after-paint notification Commit 4f2bb583bf8c changed things so that the compositor used clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT to get after-paint notification and send _NET_WM_FRAME_DRAWN, but this doesn't actually work, since Clutter will already have blocked for VBlank before calling post-paint functions. The result is that frame synced toolkits like GTK 3.8 will normally only be able to draw every other frame. Since ::paint doesn't work either, a new function clutter_stage_set_paint_callback() has been added to Clutter (and will be included in the 1.14 branch) https://bugzilla.gnome.org/show_bug.cgi?id=698794 --- configure.ac | 2 +- src/compositor/compositor.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index af9bdafdc..767910539 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,7 @@ MUTTER_PC_MODULES=" cairo >= 1.10.0 gsettings-desktop-schemas >= 3.7.3 xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0 - $CLUTTER_PACKAGE >= 1.13.5 + $CLUTTER_PACKAGE >= 1.14.3 cogl-1.0 >= 1.13.3 " diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index 40b9854b7..459ddf2cf 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -517,20 +517,20 @@ meta_check_end_modal (MetaScreen *screen) { meta_end_modal_for_plugin (screen, compositor->modal_plugin, - CurrentTime); + + CurrentTime); } } -static gboolean -after_stage_paint (gpointer data) +static void +after_stage_paint (ClutterStage *stage, + gpointer data) { MetaCompScreen *info = (MetaCompScreen*) data; GList *l; for (l = info->windows; l; l = l->next) meta_window_actor_post_paint (l->data); - - return TRUE; } static void @@ -611,9 +611,10 @@ meta_compositor_manage_screen (MetaCompositor *compositor, info->stage = clutter_stage_new (); - clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT, - after_stage_paint, - info, NULL); + clutter_stage_set_paint_callback (CLUTTER_STAGE (info->stage), + after_stage_paint, + info, + NULL); clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);