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

ndk/bitmap: Provide detailed implementation for AndroidBitmapInfoFlags #424

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

MarijnS95
Copy link
Member

As per the TODO, wrap this flags type with some helpers that fish out the two bit-representations for the IS_HARDWARE flag and ALPHA value.

Also add missing documentation and aliases across the bitmap module.

CC @dcsommer since you most recently touched this module and are likely relying on it: can you give this a review?

Comment on lines 155 to 159
/// Bitfield containing information about the bitmap.
#[cfg(feature = "api-level-30")]
#[derive(Clone, Copy)]
#[repr(transparent)]
pub struct AndroidBitmapInfoFlags(u32);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure if I should make this into a proper bitflags, there are currently only two valid values (the alpha mask, and the IS_HARDWARE flag).

@MarijnS95 MarijnS95 force-pushed the bitmap-info-flags branch 3 times, most recently from df8a24a to bfa2350 Compare August 23, 2023 22:25
As per the TODO, wrap this flags type with some helpers that fish out
the two bit-representations for the `IS_HARDWARE` flag and `ALPHA`
value.

Also add missing documentation and aliases across the `bitmap` module.
@MarijnS95 MarijnS95 merged commit 7abf3e4 into master Aug 31, 2023
36 checks passed
@MarijnS95 MarijnS95 deleted the bitmap-info-flags branch August 31, 2023 10:51
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.

1 participant