mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
Merge branch 'capture_sync_2' into 'master'
Draft: ext_image_capture_source_v1: wait for explicit sync Closes #4064 See merge request wlroots/wlroots!5314
This commit is contained in:
commit
5ad5818bec
8 changed files with 175 additions and 20 deletions
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
struct wlr_buffer;
|
||||
|
||||
/**
|
||||
* Accumulate timeline points, to have a destination timeline point be
|
||||
* signalled when all inputs are
|
||||
|
|
@ -41,4 +43,22 @@ bool wlr_drm_syncobj_merger_add(struct wlr_drm_syncobj_merger *merger,
|
|||
struct wlr_drm_syncobj_timeline *dst_timeline, uint64_t dst_point,
|
||||
struct wl_event_loop *loop);
|
||||
|
||||
/**
|
||||
* Add a new sync file to wait for.
|
||||
*
|
||||
* Ownership of fd is transferred to the merger.
|
||||
*/
|
||||
bool wlr_drm_syncobj_merger_add_sync_file(struct wlr_drm_syncobj_merger *merger,
|
||||
int fd);
|
||||
|
||||
/**
|
||||
* Add a new DMA-BUF release to wait for.
|
||||
*
|
||||
* Waits for write access.
|
||||
* If the platform does not support DMA-BUF<->sync file interop, the supplied
|
||||
* event_loop is used to schedule a wait.
|
||||
*/
|
||||
bool wlr_drm_syncobj_merger_add_dmabuf(struct wlr_drm_syncobj_merger *merger,
|
||||
struct wlr_buffer *buffer, struct wl_event_loop *event_loop);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
#include <time.h>
|
||||
|
||||
struct wlr_renderer;
|
||||
struct wlr_drm_syncobj_timeline;
|
||||
|
||||
struct wlr_ext_image_copy_capture_manager_v1 {
|
||||
struct wl_global *global;
|
||||
|
|
@ -82,6 +83,7 @@ void wlr_ext_image_copy_capture_frame_v1_fail(struct wlr_ext_image_copy_capture_
|
|||
* Copy a struct wlr_buffer into the client-provided buffer for the frame.
|
||||
*/
|
||||
bool wlr_ext_image_copy_capture_frame_v1_copy_buffer(struct wlr_ext_image_copy_capture_frame_v1 *frame,
|
||||
struct wlr_buffer *src, struct wlr_renderer *renderer);
|
||||
struct wlr_buffer *src, struct wlr_renderer *renderer,
|
||||
struct wlr_drm_syncobj_timeline *wait_timeline, uint64_t wait_point);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -74,4 +74,21 @@ bool wlr_linux_drm_syncobj_v1_state_add_release_point(
|
|||
struct wlr_drm_syncobj_timeline *release_timeline, uint64_t release_point,
|
||||
struct wl_event_loop *event_loop);
|
||||
|
||||
/**
|
||||
* Register the DMA-BUF release of a buffer for buffer usage.
|
||||
* Non-dmabuf buffers are considered to be immediately available (no wait).
|
||||
*
|
||||
* This function may be called multiple times for the same commit. The client's
|
||||
* release point will be signalled when all registered points are signalled, and
|
||||
* a new buffer has been committed.
|
||||
*
|
||||
* Because the platform may not support DMA-BUF fence merges, a wl_event_loop
|
||||
* must be supplied to schedule a wait internally, if needed
|
||||
*
|
||||
* Waits for write access
|
||||
*/
|
||||
bool wlr_linux_drm_syncobj_v1_state_add_release_from_implicit_sync(
|
||||
struct wlr_linux_drm_syncobj_surface_v1_state *state,
|
||||
struct wlr_buffer *buffer, struct wl_event_loop *event_loop);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue