From 6b0c55dd96c9d2cdcb500aad681e7645bd5a0e29 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 11 May 2016 09:44:00 -0500 Subject: [PATCH] Track parent compositor dmabuf capabilities on wayland on wayland When running as a wayland compositor connected to another wayland compositor, we don't want to advertise dmabuf capabilities if the parent compositor doesn't support them. If it does, we'll want to proxy dmabuf requests to it instead of handling them ourselves. Expose this as new bools in e_comp_wl. --- src/bin/e_comp_wl.h | 3 +++ src/modules/wl_wl/e_mod_main.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 25b7c65aa..7a7f29aeb 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -251,6 +251,9 @@ struct _E_Comp_Wl_Data E_Drag *drag; E_Client *drag_client; void *drag_source; + + Eina_Bool dmabuf_disable : 1; + Eina_Bool dmabuf_proxy : 1; }; struct _E_Comp_Wl_Client_Data diff --git a/src/modules/wl_wl/e_mod_main.c b/src/modules/wl_wl/e_mod_main.c index a00c58465..ad1162f4c 100644 --- a/src/modules/wl_wl/e_mod_main.c +++ b/src/modules/wl_wl/e_mod_main.c @@ -23,6 +23,11 @@ _cb_sync_done(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) e_comp_canvas_resize(w * 2 / 3, h * 2 / 3); + if (!ecore_wl2_display_dmabuf_get(e_comp_wl->wl.client_disp)) + e_comp_wl->dmabuf_disable = EINA_TRUE; + else + e_comp_wl->dmabuf_proxy = EINA_TRUE; + return ECORE_CALLBACK_PASS_ON; }