1
0
Fork 0

wayland: Use a stage paint callback instead of a signal handler on "paint"

This is much more appropriate...
This commit is contained in:
Jasper St. Pierre 2013-12-03 14:43:53 -05:00
parent 2746608eb2
commit 0924c7d61b
3 changed files with 5 additions and 6 deletions

View file

@ -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

View file

@ -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 */

View file

@ -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);