#[non_exhaustive]pub struct Format(pub u32);Expand description
pixel formats
This describes the memory layout of an individual pixel.
All renderers should support argb8888 and xrgb8888 but any other formats are optional and may not be supported by the particular renderer in use.
The drm format codes match the macros defined in drm_fourcc.h, except argb8888 and xrgb8888. The formats actually supported by the compositor will be reported by the format event. See drm_fourcc.h for more detailed format descriptions.
For all wl_shm formats and unless specified in another protocol extension, pre-multiplied alpha is used for pixel values.
Tuple Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.0: u32Implementations§
Source§impl Format
impl Format
Sourcepub const Xrgb2101010: Self
pub const Xrgb2101010: Self
32-bit xRGB format, [31:0] x:R:G:B 2:10:10:10 little endian
Sourcepub const Xbgr2101010: Self
pub const Xbgr2101010: Self
32-bit xBGR format, [31:0] x:B:G:R 2:10:10:10 little endian
Sourcepub const Rgbx1010102: Self
pub const Rgbx1010102: Self
32-bit RGBx format, [31:0] R:G:B:x 10:10:10:2 little endian
Sourcepub const Bgrx1010102: Self
pub const Bgrx1010102: Self
32-bit BGRx format, [31:0] B:G:R:x 10:10:10:2 little endian
Sourcepub const Argb2101010: Self
pub const Argb2101010: Self
32-bit ARGB format, [31:0] A:R:G:B 2:10:10:10 little endian
Sourcepub const Abgr2101010: Self
pub const Abgr2101010: Self
32-bit ABGR format, [31:0] A:B:G:R 2:10:10:10 little endian
Sourcepub const Rgba1010102: Self
pub const Rgba1010102: Self
32-bit RGBA format, [31:0] R:G:B:A 10:10:10:2 little endian
Sourcepub const Bgra1010102: Self
pub const Bgra1010102: Self
32-bit BGRA format, [31:0] B:G:R:A 10:10:10:2 little endian
Sourcepub const Xrgb16161616f: Self
pub const Xrgb16161616f: Self
[63:0] x:R:G:B 16:16:16:16 little endian
Sourcepub const Xbgr16161616f: Self
pub const Xbgr16161616f: Self
[63:0] x:B:G:R 16:16:16:16 little endian
Sourcepub const Argb16161616f: Self
pub const Argb16161616f: Self
[63:0] A:R:G:B 16:16:16:16 little endian
Sourcepub const Abgr16161616f: Self
pub const Abgr16161616f: Self
[63:0] A:B:G:R 16:16:16:16 little endian
Sourcepub const Y210: Self
pub const Y210: Self
[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels
Sourcepub const Y212: Self
pub const Y212: Self
[63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels
Sourcepub const Xvyu2101010: Self
pub const Xvyu2101010: Self
[31:0] X:Cr:Y:Cb 2:10:10:10 little endian
Sourcepub const Xvyu1216161616: Self
pub const Xvyu1216161616: Self
[63:0] X:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian
Sourcepub const Xvyu16161616: Self
pub const Xvyu16161616: Self
[63:0] X:Cr:Y:Cb 16:16:16:16 little endian
Sourcepub const Y0l0: Self
pub const Y0l0: Self
[63:0] A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
Sourcepub const X0l0: Self
pub const X0l0: Self
[63:0] X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0 1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian
Sourcepub const Y0l2: Self
pub const Y0l2: Self
[63:0] A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian
Sourcepub const X0l2: Self
pub const X0l2: Self
[63:0] X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0 1:1:10:10:10:1:1:10:10:10 little endian
pub const Yuv4208bit: Self
pub const Yuv42010bit: Self
pub const Xrgb8888A8: Self
pub const Xbgr8888A8: Self
pub const Rgbx8888A8: Self
pub const Bgrx8888A8: Self
pub const Rgb888A8: Self
pub const Bgr888A8: Self
pub const Rgb565A8: Self
pub const Bgr565A8: Self
Sourcepub const Axbxgxrx106106106106: Self
pub const Axbxgxrx106106106106: Self
[63:0] A:x:B:x:G:x:R:x 10:6:10:6:10:6:10:6 little endian
pub const Q410: Self
pub const Q401: Self
Sourcepub const Xrgb16161616: Self
pub const Xrgb16161616: Self
[63:0] x:R:G:B 16:16:16:16 little endian
Sourcepub const Xbgr16161616: Self
pub const Xbgr16161616: Self
[63:0] x:B:G:R 16:16:16:16 little endian
Sourcepub const Argb16161616: Self
pub const Argb16161616: Self
[63:0] A:R:G:B 16:16:16:16 little endian
Sourcepub const Abgr16161616: Self
pub const Abgr16161616: Self
[63:0] A:B:G:R 16:16:16:16 little endian
Sourcepub const Bgr161616f: Self
pub const Bgr161616f: Self
[47:0] B:G:R 16:16:16 little endian
Sourcepub const Bgr323232f: Self
pub const Bgr323232f: Self
[95:0] R:G:B 32:32:32 little endian
Sourcepub const Abgr32323232f: Self
pub const Abgr32323232f: Self
[127:0] R:G:B:A 32:32:32:32 little endian