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