aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-11-16 22:15:33 +0100
committerSimon Ser <contact@emersion.fr>2019-11-17 00:12:59 +0100
commit6c649bab537f75ebf4def87be2a59c860bcc6859 (patch)
treef1ef6d6c2896ac3f03f97a2b0be4003f4b214b67 /backend
parentcde544de81b3da6368c3f88fe6d08df0b4bc198e (diff)
output: add wlr_output_event_present.commit_seq
This is set to the value of wlr_output.commit_seq when the frame has been submitted. This allows tracking presentation with more then 1 full frame of latency. References: https://github.com/swaywm/wlroots/issues/1917
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 9bcafeb6..fc6834ff 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1497,6 +1497,9 @@ static void page_flip_handler(int fd, unsigned seq,
.tv_nsec = tv_usec * 1000,
};
struct wlr_output_event_present present_event = {
+ /* The DRM backend guarantees that the presentation event will be for
+ * the last submitted frame. */
+ .commit_seq = conn->output.commit_seq,
.when = &present_time,
.seq = seq,
.refresh = mhz_to_nsec(conn->output.refresh),