ext-image-copy-capture: emit capture_time event

Sample CLOCK_MONOTONIC at the start of copy_dmabuf and copy_shm,
store the value on the frame, and emit it before the ready event.
The timestamp marks the moment the compositor latched source content
for this capture, giving capture clients a stable anchor from which
to compute the budget remaining in the current frame interval and to
use as the source timestamp on any downstream encoded stream.

No render timer, no timeline waiter, no dependency on the explicit
sync MR (wayland-protocols !506). The capture path returns to its
previous shape with one additional clock_gettime call per frame.

IMAGE_COPY_CAPTURE_MANAGER_V1_VERSION bumped to 2.

Signed-off-by: Greg Lamberson <greg@lamco.io>
This commit is contained in:
Greg Lamberson 2026-05-09 14:58:12 -05:00
parent 57441ded02
commit 0dfddd703a
2 changed files with 27 additions and 9 deletions

View file

@ -10,9 +10,10 @@
#define WLR_TYPES_WLR_EXT_IMAGE_COPY_CAPTURE_V1_H
#include <pixman.h>
#include <stdint.h>
#include <time.h>
#include <wayland-server-protocol.h>
#include <wayland-protocols/ext-image-copy-capture-v1-enum.h>
#include <time.h>
struct wlr_renderer;
@ -58,6 +59,8 @@ struct wlr_ext_image_copy_capture_frame_v1 {
struct {
struct wlr_ext_image_copy_capture_session_v1 *session;
struct timespec capture_time;
bool capture_time_valid;
} WLR_PRIVATE;
};