From: Ander Conselvan de Oliveira Date: Mon, 24 Oct 2011 13:30:14 +0000 (+0300) Subject: compositor: don't schedule idle_repaint from calls to repaint X-Git-Tag: 0.85.0~295 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22e22a55be758970fc27b58857210801fac13f7c;p=platform%2Fupstream%2Fweston.git compositor: don't schedule idle_repaint from calls to repaint wlsc_output_repaint may call wlsc_surface_damage indirectly through wlsc_output_set_cursor. If this happens in the call made from repaint, one ends up with repaint being called from both idle_repaint and wlsc_output_finish_frame. Fix this by setting output->repaint_scheduled to 1 before calling wlsc_output_repaint in the function repaint. [krh] Edited to just only clear repaint_scheduled, when we no longer have a repaint scheduled. Signed-off-by: Ander Conselvan de Oliveira --- diff --git a/compositor/compositor.c b/compositor/compositor.c index c1765b4..17930cb 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -997,10 +997,10 @@ wlsc_output_finish_frame(struct wlsc_output *output, int msecs) output->pending_scanout_buffer = NULL; } - output->repaint_scheduled = 0; - if (output->repaint_needed) repaint(output, msecs); + else + output->repaint_scheduled = 0; } WL_EXPORT void