commit | 99cb733b6332720b9e9c5ba26050ecda43bd8fa6 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Aug 07 15:52:56 2024 +0000 |
committer | Automerger Merge Worker <[email protected]> | Wed Aug 07 15:52:56 2024 +0000 |
tree | 14d9d9e4a3ae53abfb0a6a0bfb31f40a9ee81990 | |
parent | 8579dcf53fdb14c01d848c8170e281bfc3f9f02f [diff] | |
parent | a016700ca3b458e504ca371a2181893fb239dac1 [diff] |
Update Android.bp by running cargo_embargo am: c886077de3 am: a016700ca3 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/drm-fourcc/+/3208614 Change-Id: I54a30557221d0ac3c04cfebcb0e3dd8c56dc2c5b 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.