smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Remove winit constraint from EGLNativeSurface impl

Open chrisduerr opened this issue 3 years ago • 3 comments

To make it possible for wayland clients to use Smithay's EGL abstractions, it's necessary to have an available implementation for EGLNativeSurface.

Currently the implementation for WlEglSurface is only available with the backend_winit feature enabled, which pulls in a ton of additional dependencies. Since it's not actually required, just implementing it with the backend_egl enabled should be more appropriate.

chrisduerr avatar Mar 22 '22 03:03 chrisduerr

I think it would also be worthwhile to implement EglNativeDisplay for wayland_client::Display, but I decided to not do that for now since smithay does not have a direct dependency on wayland-client yet.

Maybe it is worth it to extract this code to a separate library though, if it provides some features that clients might want. I feel like it would be more at home in the wayland-egl crate maybe?

chrisduerr avatar Mar 22 '22 03:03 chrisduerr

I think just WlEglSurface is fine.

I think it would also be worthwhile to implement EglNativeDisplay for wayland_client::Display, but I decided to not do that for now since smithay does not have a direct dependency on wayland-client yet.

Maybe it is worth it to extract this code to a separate library though, if it provides some features that clients might want. I feel like it would be more at home in the wayland-egl crate maybe?

Won't work, it relies on a WlSurface + some size and extent data provided in the WlEglSurface.

i509VCB avatar Mar 22 '22 04:03 i509VCB

Won't work, it relies on a WlSurface + some size and extent data provided in the WlEglSurface.

That still doesn't seem like something that can only done in a compositor-focused library? Even the code is smithay is for the client-side as far as I understand it. So wouldn't it be more appropriate to have it in a library that focuses on clients?

Also I'd assume your comment is just about the second quoted paragraph, because the display implementation should be trivial anywhere?

chrisduerr avatar Mar 22 '22 05:03 chrisduerr

People are better off using Glutin these days anyway, so I don't think there's much point in this PR.

chrisduerr avatar May 21 '23 22:05 chrisduerr