[mutter] compositor: Don't connect to the stage's paint signal
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] compositor: Don't connect to the stage's paint signal
- Date: Sat, 2 Mar 2013 13:42:26 +0000 (UTC)
commit 4f2bb583bf8c7f7e37f74ba09006a17c6974d792
Author: Adel Gadllah <adel gadllah gmail com>
Date: Sat Mar 2 13:15:23 2013 +0100
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
src/compositor/compositor.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index adf71d9..06ae208 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -453,9 +453,9 @@ meta_check_end_modal (MetaScreen *screen)
}
static void
-after_stage_paint (ClutterActor *stage,
- MetaCompScreen *info)
+after_stage_paint (gpointer data)
{
+ MetaCompScreen *info = (MetaCompScreen*) data;
GList *l;
for (l = info->windows; l; l = l->next)
@@ -531,8 +531,10 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
meta_screen_set_cm_selection (screen);
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]