forked from cmeissl/pixman-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the assumptions of the crate to assert that a valid `pixmap::Image` has a ref-count of 1, with an alpha map that has a ref-count of 1. Consequently, `set_alpha_map` must take ownership of its argument. My understanding, looking at the pixmap code, is that this should ensure it is safe to `Send` the `Image` to another thread. Of course this does limit the API of this crate if a consumer wants to use multiple references (though `pixman_image_ref` wasn't wrapper already), or wants to use `set_alpha_map` while still keeping a reference to the alpha map. The first issue can just be solved by wrapping in `Rc`, though. Smithay/smithay#1500
- Loading branch information
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters