2021-02-09 19:57:47 +00:00
|
|
|
#ifndef RENDER_SHM_ALLOCATOR_H
|
|
|
|
#define RENDER_SHM_ALLOCATOR_H
|
|
|
|
|
|
|
|
#include <wlr/types/wlr_buffer.h>
|
|
|
|
#include "render/allocator.h"
|
|
|
|
|
|
|
|
struct wlr_shm_buffer {
|
|
|
|
struct wlr_buffer base;
|
|
|
|
struct wlr_shm_attributes shm;
|
|
|
|
void *data;
|
|
|
|
size_t size;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_shm_allocator {
|
|
|
|
struct wlr_allocator base;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a new shared memory allocator.
|
|
|
|
*/
|
2021-04-22 01:29:33 +00:00
|
|
|
struct wlr_allocator *wlr_shm_allocator_create(void);
|
2021-02-09 19:57:47 +00:00
|
|
|
|
|
|
|
#endif
|