mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
Merge branch 'esync_cursor' into 'master'
Draft: cursor: explicit sync without `signal_release_with_buffer` See merge request wlroots/wlroots!5302
This commit is contained in:
commit
6e0d30e84a
9 changed files with 172 additions and 19 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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -36,6 +36,11 @@ struct wlr_output_mode {
|
|||
struct wl_list link;
|
||||
};
|
||||
|
||||
struct wlr_output_cursor_texture_sample_event {
|
||||
struct wlr_drm_syncobj_timeline *release_timeline;
|
||||
uint64_t release_point;
|
||||
};
|
||||
|
||||
struct wlr_output_cursor {
|
||||
struct wlr_output *output;
|
||||
double x, y;
|
||||
|
|
@ -51,6 +56,10 @@ struct wlr_output_cursor {
|
|||
uint64_t wait_point;
|
||||
struct wl_list link;
|
||||
|
||||
struct {
|
||||
struct wl_signal texture_sample; // struct wlr_output_cursor_texture_sample_event
|
||||
} events;
|
||||
|
||||
struct {
|
||||
struct wl_listener renderer_destroy;
|
||||
struct wlr_color_transform *color_transform;
|
||||
|
|
@ -442,7 +451,8 @@ void wlr_output_lock_software_cursors(struct wlr_output *output, bool lock);
|
|||
* This is a utility function that can be called when compositors render.
|
||||
*/
|
||||
void wlr_output_add_software_cursors_to_render_pass(struct wlr_output *output,
|
||||
struct wlr_render_pass *render_pass, const pixman_region32_t *damage);
|
||||
struct wlr_render_pass *render_pass, const pixman_region32_t *damage,
|
||||
struct wlr_drm_syncobj_timeline *release_timeline, uint64_t release_point);
|
||||
/**
|
||||
* Get the set of DRM formats suitable for the primary buffer, assuming a
|
||||
* buffer with the specified capabilities.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue