[mutter/wayland] wayland: Use a stage paint callback instead of a signal handler on "paint"
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] wayland: Use a stage paint callback instead of a signal handler on "paint"
- Date: Tue, 3 Dec 2013 19:49:54 +0000 (UTC)
commit 0924c7d61b4ca1b81a9d95c9b5460a0334852437
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Dec 3 14:43:53 2013 -0500
wayland: Use a stage paint callback instead of a signal handler on "paint"
This is much more appropriate...
src/compositor/compositor.c | 2 ++
src/wayland/meta-wayland-private.h | 1 +
src/wayland/meta-wayland.c | 8 ++------
3 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 93464e1..325a4ec 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -637,6 +637,8 @@ after_stage_paint (ClutterStage *stage,
for (l = info->windows; l; l = l->next)
meta_window_actor_post_paint (l->data);
+
+ meta_wayland_compositor_paint_finished (meta_wayland_compositor_get_default ());
}
static void
diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h
index d13090b..e444ae5 100644
--- a/src/wayland/meta-wayland-private.h
+++ b/src/wayland/meta-wayland-private.h
@@ -109,5 +109,6 @@ void meta_wayland_buffer_reference (MetaWaylandBuff
void meta_wayland_compositor_update (MetaWaylandCompositor *compositor,
const ClutterEvent *event);
+void meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor);
#endif /* META_WAYLAND_PRIVATE_H */
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 3d1961a..f67af7e 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -500,11 +500,9 @@ const static struct wl_compositor_interface meta_wayland_compositor_interface =
meta_wayland_compositor_create_region
};
-static void
-paint_finished_cb (ClutterActor *self, void *user_data)
+void
+meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor)
{
- MetaWaylandCompositor *compositor = user_data;
-
while (!wl_list_empty (&compositor->frame_callbacks))
{
MetaWaylandFrameCallback *callback =
@@ -711,8 +709,6 @@ meta_wayland_init (void)
compositor->outputs = meta_wayland_compositor_update_outputs (compositor, monitors);
compositor->stage = meta_wayland_stage_new ();
- g_signal_connect_after (compositor->stage, "paint",
- G_CALLBACK (paint_finished_cb), compositor);
g_signal_connect (compositor->stage, "destroy",
G_CALLBACK (stage_destroy_cb), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]