smithay icon indicating copy to clipboard operation
smithay copied to clipboard

gles: Define a `GlesContext`, with a `CurrentGlesContext` guard

Open ids1024 opened this issue 7 months ago • 1 comments

Still working through issues to use this everywhere. The goal is to prevent things like https://github.com/Smithay/smithay/pull/1748.

In particular, GlesFrame needs to be updated to hold a CurrentGlesContext. Things like blit_to/bllit_from are a little funny here since they call a function that makes a different context current, then restore the context.

ids1024 avatar Jun 02 '25 23:06 ids1024

I guess EGLContext::wait() should also require a current context.

Edit: For modularity the egl module could define an ActiveContext trait, and require that for create/wait instead of the requirement being in the doc comment but not enforced in any way.

ids1024 avatar Jun 02 '25 23:06 ids1024