1From efcd019c73262954d0167e0422b0189d9fe15880 Mon Sep 17 00:00:00 2001 2From: Jeffy Chen <jeffy.chen@rock-chips.com> 3Date: Fri, 27 May 2022 15:39:10 +0800 4Subject: [PATCH 65/92] compositor: Use current timestamp for animation 5 6Avoid "unexpectedly large timestamp jump" warning for the first frame of 7animation. 8 9Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> 10--- 11 libweston/compositor.c | 4 +++- 12 1 file changed, 3 insertions(+), 1 deletion(-) 13 14diff --git a/libweston/compositor.c b/libweston/compositor.c 15index 5c1d051..a99c8b8 100644 16--- a/libweston/compositor.c 17+++ b/libweston/compositor.c 18@@ -3309,6 +3309,7 @@ weston_output_repaint(struct weston_output *output) 19 int r; 20 uint32_t frame_time_msec; 21 enum weston_hdcp_protection highest_requested = WESTON_HDCP_DISABLE; 22+ struct timespec now; 23 24 if (output->destroying) 25 return 0; 26@@ -3405,9 +3406,10 @@ weston_output_repaint(struct weston_output *output) 27 wl_resource_destroy(cb); 28 } 29 30+ weston_compositor_read_presentation_clock(ec, &now); 31 wl_list_for_each_safe(animation, next, &output->animation_list, link) { 32 animation->frame_counter++; 33- animation->frame(animation, output, &output->frame_time); 34+ animation->frame(animation, output, &now); 35 } 36 37 TL_POINT(ec, "core_repaint_posted", TLP_OUTPUT(output), TLP_END); 38-- 392.20.1 40 41