aboutsummaryrefslogtreecommitdiff
path: root/include/render/wlr_renderer.h
blob: 8298bab78e5d28747e77c8563575e0c79d6dd712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef RENDER_WLR_RENDERER_H
#define RENDER_WLR_RENDERER_H

#include <wlr/render/wlr_renderer.h>

/**
 * Automatically select and create a renderer suitable for the DRM FD.
 */
struct wlr_renderer *wlr_renderer_autocreate_with_drm_fd(int drm_fd);
/**
 * Bind a buffer to the renderer.
 *
 * All subsequent rendering operations will operate on the supplied buffer.
 * After rendering operations are done, the caller must unbind a buffer by
 * calling wlr_renderer_bind_buffer with a NULL buffer.
 */
bool wlr_renderer_bind_buffer(struct wlr_renderer *r, struct wlr_buffer *buffer);
/**
 * Get the supported render formats. Buffers allocated with a format from this
 * list may be attached via wlr_renderer_bind_buffer.
 */
const struct wlr_drm_format_set *wlr_renderer_get_render_formats(
	struct wlr_renderer *renderer);

#endif