| commit | 17d59d14cb7874f609d6ce47e2f559e8d752203c | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Fri Aug 01 23:12:58 2025 -0700 |
| committer | Android Build Coastguard Worker <[email protected]> | Fri Aug 01 23:12:58 2025 -0700 |
| tree | 344e2ff0690c4b39db3c32b2629013dffb51e696 | |
| parent | dd606e3c9bbabdaa0fe759377fd5a2829ab29ced [diff] | |
| parent | b466944623116e5688e295edb8280270ceb8f8b7 [diff] |
Snap for 13873778 from b466944623116e5688e295edb8280270ceb8f8b7 to internal-android15-automotiveos-lts-release Change-Id: I1be871b46e9110348c9d462e35384bc1f0c032e5
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.