commit | 17511d1e8547e81dd805f1d6b018559117655fd4 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Sat May 11 01:12:18 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Sat May 11 01:12:18 2024 +0000 |
tree | 13ff360c9305cbc90836148489b5f344278af6da | |
parent | fc278be6ba38238edb023f1d9b0b8c21c51b037a [diff] | |
parent | 9ea74afc97f1358b24ad31fbbcc55042e33a3832 [diff] |
Snap for 11828632 from 9ea74afc97f1358b24ad31fbbcc55042e33a3832 to 24Q3-release Change-Id: Iabde81ac4909b91ce714257179f5d568b6380d0e
Provides an enums representing every pixel format and format modifier supported by DRM (as of kernel version 5.10.0).
A fourcc is four bytes of ascii representing some data format. This enum contains every fourcc representing a pixel format supported by DRM, the Linux Direct Rendering Manager.
To get the bytes of the fourcc representing the format, cast to u32
.
assert_eq!(DrmFourcc::Xrgb8888 as u32, 875713112);
To get the string form of the fourcc, use [DrmFourcc::string_form
].
assert_eq!(DrmFourcc::Xrgb8888.string_form(), "XR24");
We also provide a type for representing a fourcc/modifier pair
let format = DrmFormat { code: DrmFourcc::Xrgb8888, modifier: DrmModifier::Linear, };
The enums are autogenerated from the canonical list in the Linux source code.
std
: Enable functionality that requires the standard library. Enabled by defaultbuild_bindings
: Build the bindings based on the headers on your machine. Should not be necessary in most cases.