diff options
author | Andri Yngvason <andri@yngvason.is> | 2020-04-26 18:20:34 +0000 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-04-27 15:40:03 +0200 |
commit | e51d507799eddf103f7f2df09c2c4bdcd0864ec9 (patch) | |
tree | 40db9181d28607033c09e561bea696198a8c6b50 | |
parent | 39af3535c3791ead9cf182ad67fec30f5259b1a3 (diff) |
export-dmabuf: Schedule output frame on request
A client requesting frames in the ready callback may miss frames that
happen while it is waiting to receive the event or sending the request.
If that happens, the client will have an outdated frame for an
indefinite period. A new frame might not be scheduled for a very long
time.
With this change, clients will receive new frames immediately upon
request.
-rw-r--r-- | types/wlr_export_dmabuf_v1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/types/wlr_export_dmabuf_v1.c b/types/wlr_export_dmabuf_v1.c index 2be9e028..3f17cc8b 100644 --- a/types/wlr_export_dmabuf_v1.c +++ b/types/wlr_export_dmabuf_v1.c @@ -150,6 +150,8 @@ static void manager_handle_capture_output(struct wl_client *client, attribs->fd[i], size, attribs->offset[i], attribs->stride[i], i); } + wlr_output_schedule_frame(output); + wl_list_remove(&frame->output_precommit.link); wl_signal_add(&output->events.precommit, &frame->output_precommit); frame->output_precommit.notify = frame_output_handle_precommit; |