commit | b08a0a39ea0e0cfde96e6347c66cb1d843ef74b6 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue May 14 23:09:03 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue May 14 23:09:03 2024 +0000 |
tree | 13ff360c9305cbc90836148489b5f344278af6da | |
parent | fb9272721fb8c617469291bb7419319effc9cd95 [diff] | |
parent | 3b1a5647fe031637f17aba0e1add5fe2b219a57a [diff] |
Snap for 11841552 from 3b1a5647fe031637f17aba0e1add5fe2b219a57a to sdk-release Change-Id: I44a8adca1b3f945840a3520cc0abe1ee400cd71c
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.