aboutsummaryrefslogtreecommitdiff
path: root/include/render/shm_allocator.h
blob: d1f48f7f671400e8552f481c5da6675ec0d086fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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.
 */
struct wlr_allocator *wlr_shm_allocator_create(void);

#endif