aboutsummaryrefslogtreecommitdiff
path: root/include/render/allocator/shm.h
blob: 4b80e47539932ab02c9c21d691acc29fc4cc9b14 (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_ALLOCATOR_SHM_H
#define RENDER_ALLOCATOR_SHM_H

#include <wlr/types/wlr_buffer.h>
#include "render/allocator/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