Get rid of unsafe on EGLContext #1092
JoHaHu
started this conversation in
API Design
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently starting to learn much about wayland and the linux graphics stack.
My goal is to write my own wayland composer in Rust using smithay.
While studying the code base i've got some questions.
The EGLContext is only safe to Send under certain conditions.
A lot of functions in the egl module are unsafe for that reason.
https://github.com/Smithay/smithay/blob/master/src/backend/egl/context.rs#L36C1-L41C35
With an API like this only UnboundEGLContext is Send and functions can be implemented on the types where there are safe to use.
Are there any reasons why this wouldn't work?
Are there more safety contraints I'm unaware of?
Beta Was this translation helpful? Give feedback.
All reactions