[PATCH weston 2/2] compositor: Skip repaint delay for nested compositors

Derek Foreman derekf at osg.samsung.com
Wed Apr 1 10:37:34 PDT 2015


The repaint delay becomes cumulative if it's used in both a parent
compositor and a nested compositor.  This can lead to dropped frames
and visible latency.

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

diff --git a/src/compositor.c b/src/compositor.c
index 4de8fbf..433f6d2 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2412,6 +2412,14 @@ weston_output_finish_frame(struct weston_output *output,
 	msec = (refresh_nsec - timespec_to_nsec(&gone)) / 1000000; /* floor */
 	msec -= compositor->repaint_msec;
 
+	/* If nested outputs try to use a repaint window the delay sums
+	 * with the parent's delay and we start dropping frames...
+	 */
+	if (compositor->nested) {
+		output_repaint_timer_handler(output);
+		return;
+	}
+
 	if (msec < -1000 || msec > 1000) {
 		static bool warned;
 
-- 
2.1.4



More information about the wayland-devel mailing list