diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-06-21 16:33:27 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-06-21 16:41:20 +0200 |
commit | d72037cc78f6ebf00dad060b096e230e47e37e83 (patch) | |
tree | 34867596b2f03d96d2d4f2aba4de9a1476973849 | |
parent | fb4b5a293abf02b86f3521f71e6291abad2d1401 (diff) |
compositor: Send frame event after redraw
-rw-r--r-- | compositor/compositor.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/compositor/compositor.c b/compositor/compositor.c index bb4d56dd..0dcfc7ce 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -578,16 +578,8 @@ WL_EXPORT void wlsc_output_finish_frame(struct wlsc_output *output, int msecs) { struct wlsc_compositor *compositor = output->compositor; - struct wlsc_surface *es; struct wlsc_animation *animation, *next; - wl_list_for_each(es, &compositor->surface_list, link) { - if (es->output == output) { - wl_display_post_frame(compositor->wl_display, - &es->surface, msecs); - } - } - output->finished = 1; wl_event_source_timer_update(compositor->timer_source, 5); @@ -598,6 +590,20 @@ wlsc_output_finish_frame(struct wlsc_output *output, int msecs) animation->frame(animation, output, msecs); } +static void +wlsc_output_finish_redraw(struct wlsc_output *output, int msecs) +{ + struct wlsc_compositor *compositor = output->compositor; + struct wlsc_surface *es; + + wl_list_for_each(es, &compositor->surface_list, link) { + if (es->output == output) { + wl_display_post_frame(compositor->wl_display, + &es->surface, msecs); + } + } +} + WL_EXPORT void wlsc_output_damage(struct wlsc_output *output) { @@ -709,6 +715,9 @@ wlsc_output_repaint(struct wlsc_output *output) pixman_region32_union(&ec->damage_region, &ec->damage_region, &total_damage); + + wlsc_output_finish_redraw(output, + wlsc_compositor_get_time()); return; } } @@ -747,6 +756,8 @@ wlsc_output_repaint(struct wlsc_output *output) if (ec->fade.spring.current > 0.001) fade_output(output, ec->fade.spring.current, &total_damage); + + wlsc_output_finish_redraw(output, wlsc_compositor_get_time()); } static int |