mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
For development to continue on systems (such as optimus laptops) that have multiple GPUs, we need a way to reference all of the renderers that have been created for devices in the system. A wlr_multi_gpu struct holds renderers coming from two different sources: 1. the primary renderer (given to us by the compositor) 2. drm sub backends, each of which has a renderer created for cross-GPU copies. This change provides a way to access all of these from the same place.
38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
/*
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
* future consistency of this API.
|
|
*/
|
|
#ifndef WLR_USE_UNSTABLE
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
#endif
|
|
|
|
#ifndef WLR_BACKEND_MULTI_H
|
|
#define WLR_BACKEND_MULTI_H
|
|
|
|
#include <wlr/backend.h>
|
|
|
|
/**
|
|
* Creates a multi-backend. Multi-backends wrap an arbitrary number of backends
|
|
* and aggregate their new_output/new_input signals.
|
|
*/
|
|
struct wlr_backend *wlr_multi_backend_create(struct wl_event_loop *loop);
|
|
/**
|
|
* Adds the given backend to the multi backend. This should be done before the
|
|
* new backend is started.
|
|
*/
|
|
bool wlr_multi_backend_add(struct wlr_backend *multi,
|
|
struct wlr_backend *backend);
|
|
|
|
void wlr_multi_backend_remove(struct wlr_backend *multi,
|
|
struct wlr_backend *backend);
|
|
|
|
bool wlr_backend_is_multi(struct wlr_backend *backend);
|
|
bool wlr_multi_is_empty(struct wlr_backend *backend);
|
|
|
|
void wlr_multi_for_each_backend(struct wlr_backend *backend,
|
|
void (*callback)(struct wlr_backend *backend, void *data), void *data);
|
|
|
|
struct wlr_multi_gpu *wlr_multi_gpu_create(void);
|
|
void wlr_multi_gpu_destroy(struct wlr_multi_gpu *multi_gpu);
|
|
|
|
#endif
|