mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-10-27 18:24:16 +00:00
add support for linux-drm-syncobj-v1 (wlroots!4715)
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4262 References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4715
This commit is contained in:
parent
a8403d7b4d
commit
6b2d07da0b
6
dwl.c
6
dwl.c
@ -32,6 +32,7 @@
|
|||||||
#include <wlr/types/wlr_keyboard_group.h>
|
#include <wlr/types/wlr_keyboard_group.h>
|
||||||
#include <wlr/types/wlr_layer_shell_v1.h>
|
#include <wlr/types/wlr_layer_shell_v1.h>
|
||||||
#include <wlr/types/wlr_linux_dmabuf_v1.h>
|
#include <wlr/types/wlr_linux_dmabuf_v1.h>
|
||||||
|
#include <wlr/types/wlr_linux_drm_syncobj_v1.h>
|
||||||
#include <wlr/types/wlr_output.h>
|
#include <wlr/types/wlr_output.h>
|
||||||
#include <wlr/types/wlr_output_layout.h>
|
#include <wlr/types/wlr_output_layout.h>
|
||||||
#include <wlr/types/wlr_output_management_v1.h>
|
#include <wlr/types/wlr_output_management_v1.h>
|
||||||
@ -2384,7 +2385,7 @@ setsel(struct wl_listener *listener, void *data)
|
|||||||
void
|
void
|
||||||
setup(void)
|
setup(void)
|
||||||
{
|
{
|
||||||
int i, sig[] = {SIGCHLD, SIGINT, SIGTERM, SIGPIPE};
|
int drm_fd, i, sig[] = {SIGCHLD, SIGINT, SIGTERM, SIGPIPE};
|
||||||
struct sigaction sa = {.sa_flags = SA_RESTART, .sa_handler = handlesig};
|
struct sigaction sa = {.sa_flags = SA_RESTART, .sa_handler = handlesig};
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
|
|
||||||
@ -2434,6 +2435,9 @@ setup(void)
|
|||||||
wlr_linux_dmabuf_v1_create_with_renderer(dpy, 4, drw));
|
wlr_linux_dmabuf_v1_create_with_renderer(dpy, 4, drw));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((drm_fd = wlr_renderer_get_drm_fd(drw)) >= 0 && drw->features.timeline)
|
||||||
|
wlr_linux_drm_syncobj_manager_v1_create(dpy, 1, drm_fd);
|
||||||
|
|
||||||
/* Autocreates an allocator for us.
|
/* Autocreates an allocator for us.
|
||||||
* The allocator is the bridge between the renderer and the backend. It
|
* The allocator is the bridge between the renderer and the backend. It
|
||||||
* handles the buffer creation, allowing wlroots to render onto the
|
* handles the buffer creation, allowing wlroots to render onto the
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user