mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
multi-backend: do not expose internal renderers
backend_get_renderer() is now returning the renderer of the primary GPU, instead of its own renderer, since that's the thing which actually does all of the "real" rendering wlr_multi_backend_add() is now adding all subbackends (otherwise only one GPU is handled). credits: @ascent12
This commit is contained in:
parent
eb9c9d8852
commit
15dacebc36
2 changed files with 7 additions and 2 deletions
|
|
@ -51,7 +51,12 @@ static void backend_destroy(struct wlr_backend *backend) {
|
|||
static struct wlr_renderer *backend_get_renderer(
|
||||
struct wlr_backend *backend) {
|
||||
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)backend;
|
||||
return drm->renderer.wlr_rend;
|
||||
|
||||
if (drm->parent) {
|
||||
return drm->parent->renderer.wlr_rend;
|
||||
} else {
|
||||
return drm->renderer.wlr_rend;
|
||||
}
|
||||
}
|
||||
|
||||
static struct wlr_backend_impl backend_impl = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue