aboutsummaryrefslogtreecommitdiff
path: root/backend/multi/backend.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-10 22:20:21 -0400
committerGitHub <noreply@github.com>2017-08-10 22:20:21 -0400
commit6569c2b62614384b268eb20feb7818f3c0cf606c (patch)
tree4be63a8f4e2edfcecd228f23e9846403ddf39281 /backend/multi/backend.c
parentfe2fbd0fad96624ab64a86b0b8eb8ead769908f2 (diff)
parentc24351681f672a2ce561b9cb6d73172dfc36c45c (diff)
Merge pull request #53 from nyorain/drm_buffer
Implement drm (egl) buffer attaching
Diffstat (limited to 'backend/multi/backend.c')
-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,