mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render: introduce wlr_renderer_get_drm_fd
This commit is contained in:
parent
c8d95acc37
commit
eb8360bda3
5 changed files with 34 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ struct wlr_gles2_renderer {
|
|||
struct wlr_renderer wlr_renderer;
|
||||
|
||||
struct wlr_egl *egl;
|
||||
int drm_fd;
|
||||
|
||||
const char *exts_str;
|
||||
struct {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ struct wlr_renderer_impl {
|
|||
bool (*blit_dmabuf)(struct wlr_renderer *renderer,
|
||||
struct wlr_dmabuf_attributes *dst,
|
||||
struct wlr_dmabuf_attributes *src);
|
||||
int (*get_drm_fd)(struct wlr_renderer *renderer);
|
||||
};
|
||||
|
||||
void wlr_renderer_init(struct wlr_renderer *renderer,
|
||||
|
|
|
|||
|
|
@ -131,6 +131,13 @@ bool wlr_renderer_format_supported(struct wlr_renderer *r,
|
|||
bool wlr_renderer_init_wl_display(struct wlr_renderer *r,
|
||||
struct wl_display *wl_display);
|
||||
|
||||
/**
|
||||
* Obtains the FD of the DRM device used for rendering, or -1 if unavailable.
|
||||
*
|
||||
* The caller doesn't have ownership of the FD, it must not close it.
|
||||
*/
|
||||
int wlr_renderer_get_drm_fd(struct wlr_renderer *r);
|
||||
|
||||
/**
|
||||
* Destroys this wlr_renderer. Textures must be destroyed separately.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue