tag | 342970d41e56060163acce5d7d13a08a92a9ce9e | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Apr 23 15:27:27 2024 -0700 |
object | fb9272721fb8c617469291bb7419319effc9cd95 |
Platform Tools Release 35.0.1 (11580240)
commit | fb9272721fb8c617469291bb7419319effc9cd95 | [log] [tgz] |
---|---|---|
author | Inna Palant <ipalant@google.com> | Thu Mar 28 07:08:08 2024 +0000 |
committer | Inna Palant <ipalant@google.com> | Thu Mar 28 07:08:08 2024 +0000 |
tree | b86b60172a4402713932852a07cd94f3f88de2fc | |
parent | 517a652a90b8c8dea12267c9769604bbe99e9ae6 [diff] | |
parent | 45d1e16e5b94a2867281ec40a33a2a5c271ed920 [diff] |
Merge remote-tracking branch 'origin/upstream' Import b/328180685
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.