2021-08-25 09:33:19 +02:00
|
|
|
#ifndef RENDER_ALLOCATOR_SHM_H
|
|
|
|
#define RENDER_ALLOCATOR_SHM_H
|
2021-02-09 20:57:47 +01:00
|
|
|
|
|
|
|
#include <wlr/types/wlr_buffer.h>
|
2021-08-25 09:33:19 +02:00
|
|
|
#include "render/allocator/allocator.h"
|
2021-02-09 20:57:47 +01:00
|
|
|
|
|
|
|
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 03:29:33 +02:00
|
|
|
struct wlr_allocator *wlr_shm_allocator_create(void);
|
2021-02-09 20:57:47 +01:00
|
|
|
|
|
|
|
#endif
|