aboutsummaryrefslogtreecommitdiff
path: root/backend/multi
diff options
context:
space:
mode:
Diffstat (limited to 'backend/multi')
-rw-r--r--backend/multi/backend.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index 19839629..9563356d 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -38,9 +38,21 @@ static void multi_backend_destroy(struct wlr_backend_state *state) {
free(state);
}
+static struct wlr_egl *multi_backend_get_egl(struct wlr_backend_state *state) {
+ for (size_t i = 0; i < state->backends->length; ++i) {
+ struct subbackend_state *sub = state->backends->items[i];
+ struct wlr_egl *egl = wlr_backend_get_egl(sub->backend);
+ if (egl) {
+ return egl;
+ }
+ }
+ return NULL;
+}
+
struct wlr_backend_impl backend_impl = {
.init = multi_backend_init,
- .destroy = multi_backend_destroy
+ .destroy = multi_backend_destroy,
+ .get_egl = multi_backend_get_egl
};
struct wlr_backend *wlr_multi_backend_create(struct wlr_session *session,