compositor: Don't connect to the stage's paint signal
Doing so causes useless full stage redraws and breaks culling as clutter cannot know how the signal handler affects painting. So use clutter_threads_add_repaint_func_full with the CLUTTER_REPAINT_FLAGS_POST_PAINT flag instead. https://bugzilla.gnome.org/show_bug.cgi?id=694988
This commit is contained in:
parent
702f3fc691
commit
4f2bb583bf
@ -453,9 +453,9 @@ meta_check_end_modal (MetaScreen *screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
after_stage_paint (ClutterActor *stage,
|
after_stage_paint (gpointer data)
|
||||||
MetaCompScreen *info)
|
|
||||||
{
|
{
|
||||||
|
MetaCompScreen *info = (MetaCompScreen*) data;
|
||||||
GList *l;
|
GList *l;
|
||||||
|
|
||||||
for (l = info->windows; l; l = l->next)
|
for (l = info->windows; l; l = l->next)
|
||||||
@ -531,8 +531,10 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
|||||||
meta_screen_set_cm_selection (screen);
|
meta_screen_set_cm_selection (screen);
|
||||||
|
|
||||||
info->stage = clutter_stage_new ();
|
info->stage = clutter_stage_new ();
|
||||||
g_signal_connect_after (info->stage, "paint",
|
|
||||||
G_CALLBACK (after_stage_paint), info);
|
clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT,
|
||||||
|
(GSourceFunc) after_stage_paint,
|
||||||
|
info, NULL);
|
||||||
|
|
||||||
clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);
|
clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), META_SYNC_DELAY);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user