Use new clutter_stage_set_paint_callback() function for after-paint notification
Commit 4f2bb583bf
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
This commit is contained in:
parent
c119f98bac
commit
47b21b3547
@ -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
|
||||
"
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user