gecko-dev/third_party/rust/drm-fourcc
Dzmitry Malyshau 1da5651ba2 Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio
This *mostly* gets us the latest WebIDL API of WebGPU. There is a few limits we are missing, and maybe some things I didn't notice.
But it gets us the new `GPUCanvasContext`, `GPUSupportedLimits`, and `GPUVertexStepMode`.

Differential Revision: https://phabricator.services.mozilla.com/D120764
2021-08-18 14:11:21 +00:00
..
src Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio 2021-08-18 14:11:21 +00:00
.cargo-checksum.json Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio 2021-08-18 14:11:21 +00:00
Cargo.toml Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio 2021-08-18 14:11:21 +00:00
README.md Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio 2021-08-18 14:11:21 +00:00
build.rs Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio 2021-08-18 14:11:21 +00:00

README.md

drm-fourcc

Crates.io MIT Licensed

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.

Contributors