smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Replacing `backend::egl` with glutin

Open i509VCB opened this issue 2 years ago • 0 comments

Since glutin 0.30 the library no longer depends on winit and is usable in any context where a RawDisplayHandle and RawWindowHandle is available. This would mean that Smithay would be able to delete the vast majority of it's own EGL code use glutin's code.

In the case of Smithay, we would only need to egl API from glutin: https://docs.rs/glutin/0.30.7/glutin/api/egl/index.html

There are some things we to add upstream to glutin in order to complete this:

  • Way to create a Display from a raw EGLDisplay pointer: https://github.com/rust-windowing/glutin/issues/1509
  • Way to create a Context from a raw EGLContext pointer (also 1509)

And obviously not regress this issue: https://github.com/Smithay/smithay/issues/447

We might not however be able to delete that module completely, but we can simply just provide extension traits and some other smaller things there.

cc @kchibisov, @Drakulix

i509VCB avatar Mar 18 '23 22:03 i509VCB