This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch wl/x11-output
in repository enlightenment.

View the commit online.

commit 5c5804b8ba37cbb16d9f53d1522bbb8ddcff1793
Author: Cedric BAIL <[email protected]>
AuthorDate: Thu Aug 13 20:46:30 2026 -0600

    wl_x11 - offer dmabuf when the canvas can actually take it
    
    dmabuf was switched off here unconditionally, and with reason: the gl_x11
    evas engine had no EVAS_NATIVE_SURFACE_WL_DMABUF branch, so every buffer a
    client sent failed e_pixmap_dmabuf_test(), and e_comp_wl_dmabuf.c treats
    that as fatal and kills the client. Leaving the protocol unadvertised was
    the only way not to hand out an offer we would kill people for taking.
    
    gl_x11 imports now, so the remaining reason to say no is a software canvas:
    there is nothing to import into and wl_shm is the honest answer.
    
    The test is e_comp->gl, not e_comp_gl_get(). The latter is whether GL is
    available at all, and it is not a proxy for what the canvas ended up being.
    e_comp_x_randr_canvas_new() sets it false when it falls back to
    software_x11 - but e_comp_wl_init(), which runs immediately after us, sets
    it true again whenever it can bind an EGL display. Gating on it advertises
    dmabuf on a software canvas, which is precisely the tell-them-yes-then-kill
    -them case, and it is reachable today: the compositor engine defaults to
    E_COMP_ENGINE_SW. e_pixmap_dmabuf_test() already reads e_comp->gl for the
    same reason.
    
    Verified both ways on a nested compositor: E_COMP_ENGINE=sw loads
    software_x11 and advertises nothing, E_COMP_ENGINE=gl loads gl_x11 and
    advertises zwp_linux_dmabuf_v1 v3. Brave then runs on imported buffers -
    114 imports, no failures, no wl_shm - including ARM AFBC-compressed ones.
    
    Co-Authored-By: Claude Opus 5 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
 src/modules/wl_x11/e_mod_main.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c
index 507f82e92..e05b248ec 100644
--- a/src/modules/wl_x11/e_mod_main.c
+++ b/src/modules/wl_x11/e_mod_main.c
@@ -76,7 +76,20 @@ e_modapi_init(E_Module *m)
    e_comp->pointer = e_pointer_canvas_new(e_comp->ee, EINA_TRUE);
    e_comp->pointer->color = EINA_TRUE;
 
-   e_comp_wl->dmabuf_disable = EINA_TRUE;
+   /* dmabuf was switched off here unconditionally because the gl_x11 evas
+    * engine could not import EVAS_NATIVE_SURFACE_WL_DMABUF, so every buffer
+    * a client handed us failed e_pixmap_dmabuf_test() and the client got
+    * killed for it. gl_x11 imports now, so the only reason left to say no is
+    * a software canvas: there is nothing to import into and wl_shm is the
+    * honest answer.
+    *
+    * e_comp->gl, not e_comp_gl_get(). The latter is whether GL is available
+    * at all, and e_comp_wl_init() - which ran just above - sets it true
+    * whenever it can bind an EGL display, even after the canvas has already
+    * fallen back to software_x11. Advertising on that combination is how a
+    * client gets told yes and then killed for the buffer it sends.
+    * e_pixmap_dmabuf_test() already reads e_comp->gl for the same reason. */
+   e_comp_wl->dmabuf_disable = !e_comp->gl;
 
    return m;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to