From 15dacebc36ffa137aefafcfbe723c7b35af5cc2b Mon Sep 17 00:00:00 2001 From: Mariusz Bialonczyk Date: Thu, 2 Aug 2018 13:37:23 +0200 Subject: 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 --- backend/drm/backend.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'backend/drm') diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 5833d46e..1df5cdd1 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -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 = { -- cgit v1.2.3