[PATCH weston 4/6] compositor: Make repaint loop exit frequently in test mode

Derek Foreman derekf at osg.samsung.com
Fri Dec 19 10:45:48 PST 2014

When in test mode the clock is only updated by client intervention.  If
an animation is trying to run with a clock that won't advance the
compositor will remain stuck in a tight loop.

To stop this, we don't let weston_output_reschedule_repaint set
repaint_needed if we're already scheduled in test mode.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
 src/compositor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compositor.c b/src/compositor.c
index 61ba041..7b22219 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2184,6 +2184,9 @@ weston_output_schedule_repaint(struct weston_output *output)
 	struct weston_compositor *compositor = output->compositor;
 	struct wl_event_loop *loop;
+	if (output->repaint_scheduled && output->compositor->test_mode)
+		return;
 	if (compositor->state == WESTON_COMPOSITOR_SLEEPING ||
 	    compositor->state == WESTON_COMPOSITOR_OFFSCREEN)

More information about the wayland-devel mailing list