mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
render,types/wlr_shm: Offload slow cleanup ops
Defers close()/munmap() calls into a cleanup thread in to avoid blocking when they are slow. This is most noticable on low end hardware with large screens where large surfaces can spend considerable time invalidating mmus on the gpu or clearing shmem pages.
This commit is contained in:
parent
015bb8512e
commit
5cc737d599
6 changed files with 130 additions and 4 deletions
10
include/util/cleanup.h
Normal file
10
include/util/cleanup.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
typedef void (*wlr_task_cb)(void *data);
|
||||
|
||||
struct wlr_task {
|
||||
wlr_task_cb task;
|
||||
void *data;
|
||||
};
|
||||
|
||||
void wlr_cleanup_queue_init(void);
|
||||
void wlr_cleanup_queue_finish(void);
|
||||
void wlr_cleanup_defer(struct wlr_task t);
|
||||
Loading…
Add table
Add a link
Reference in a new issue