Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to pixman 0.2, and make PixmanTexture thread-safe #1600

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Dec 3, 2024

Needs testing. Compiles, but I haven't checked that the borrow_mut calls can't panic.

Requires cmeissl/pixman-rs#19.

@ids1024
Copy link
Member Author

ids1024 commented Dec 5, 2024

I think if the pixman-rs PR is merged and released, everything here is good.

@cmeissl
Copy link
Collaborator

cmeissl commented Dec 8, 2024

pixman-rs 0.2.0 is out https://crates.io/crates/pixman/0.2.0

Enable the new `sync` feature to make `pixman::Image` `Send`/`Sync`.

The new `pixman` version also makes various methods take `&mut`, so this
updates things to use mutable references where needed. This changes some
`borrow()` calls to `borrow_mut()`, but looks like it shouldn't cause
double borrows.
It is no more unsafe to access this in multiple threads than in one. The
caller should assume another process may be mutating the buffer.
Allows `PixmanImage` to be sent to another thread.
@ids1024 ids1024 changed the title WIP Update pixman-rs to version providing Send Update to pixman 0.2, and make PixmanTexture thread-safe Dec 9, 2024
@ids1024 ids1024 marked this pull request as ready for review December 9, 2024 02:26
@Drakulix Drakulix merged commit bae0e9f into Smithay:master Dec 9, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants