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

docs: Fix RGB565 format documentation and bit masks #57210

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions shell/platform/embedder/embedder.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@ typedef enum {
/// occupying the lowest memory address.
///
/// - all other formats are called packed formats, and the component order
/// as specified in the format name refers to the order in the native type.
/// for example, for kFlutterSoftwarePixelFormatRGB565, the R component
/// uses the 5 least significant bits of the uint16_t pixel value.
/// as specified in the format name refers to the order from most significant
/// to least significant bits in the native type.
/// for example, for kFlutterSoftwarePixelFormatRGB565, R occupies the 5 most
/// significant bits, G the middle 6 bits, and B the 5 least significant bits.
///
/// Each pixel format in this list is documented with an example on how to get
/// the color components from the pixel.
Expand All @@ -348,11 +349,11 @@ typedef enum {
kFlutterSoftwarePixelFormatGray8,

/// pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word.
/// r = p & 0x3F; g = (p>>5) & 0x3F; b = p>>11;
/// r = (p >> 11) & 0x1F; g = (p >> 5) & 0x3F; b = p & 0x1F;
kFlutterSoftwarePixelFormatRGB565,

/// pixel with 4 bits for alpha, red, green, blue; in 16-bit word.
/// r = p & 0xF; g = (p>>4) & 0xF; b = (p>>8) & 0xF; a = p>>12;
/// r = (p >> 8) & 0xF; g = (p >> 4) & 0xF; b = p & 0xF; a = (p >> 12) & 0xF;
kFlutterSoftwarePixelFormatRGBA4444,

/// pixel with 8 bits for red, green, blue, alpha.
Expand Down
Loading