[PATCH 1/2] compositor: don't schedule idle_repaint from calls to repaint
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Mon Oct 24 06:30:14 PDT 2011
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.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
---
compositor/compositor.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/compositor/compositor.c b/compositor/compositor.c
index 17b347e..b67aa33 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -966,9 +966,15 @@ repaint(void *data, int msecs)
struct wlsc_animation *animation, *next;
struct wlsc_frame_callback *cb, *cnext;
- wlsc_output_repaint(output);
+ /* Set repaint_schedule to 1 before calling wlsc_output_repaint
+ * since it may call wlsc_output_schedule_repaint indirectly
+ * in which case idle_repaint will be scheduled even though
+ * wlsc_output_finish_frame will call repaint once the frame
+ * completes. */
output->repaint_needed = 0;
output->repaint_scheduled = 1;
+
+ wlsc_output_repaint(output);
output->present(output);
wl_list_for_each_safe(cb, cnext, &output->frame_callback_list, link) {
--
1.7.4.1
More information about the wayland-devel
mailing list