commit | d3a40ae1c4f641121e485a4dd17927b2dcfd8b4d | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Tue May 21 14:38:05 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Tue May 21 14:38:05 2024 +0000 |
tree | b0a0d1021b1a9ef765e000c679d42ca5b723b45b | |
parent | 04e8a932f54d7fcec84e03b798cd43eac2f0005f [diff] | |
parent | f67c19ee530afcdae36a79626aaf91239ef54973 [diff] |
Update Android.bp by running cargo_embargo am: f67c19ee53 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/drm-fourcc/+/3094772 Change-Id: I081ef6ad6bac9abc267547f5c8d8b0380b70515f Signed-off-by: Automerger Merge Worker <[email protected]>
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.