Module surface

Module surface 

Source
Expand description

Surface presentation configuration: present modes, alpha compositing, and color-space types (HDR and wide-gamut output).

This module is re-exported flatly from wgpu-types; the user-facing color space and HDR primer lives in the wgpu crate’s top-level docs.

Structs§

DisplayChromaticity
CIE 1931 xy chromaticity of a display’s primaries and white point. Each coordinate is [x, y]; a coordinate the platform omits is None.
DisplayCoarseRange
Coarse, boolean dynamic-range and gamut signal.
DisplayHdrInfo
HDR and luminance characteristics of the display backing a Surface, as reported by the platform at query time.
DisplayHeadroom
Relative EDR headroom (Apple): unitless multipliers over current SDR white, where 1.0 means no headroom. Moves with brightness, ambient light, battery, and which display the window is on. Apple exposes no absolute-nit equivalent, so this is separate from DisplayLuminance and can’t be converted to nits.
DisplayLuminance
Absolute luminance levels in nits (cd/m²). Populated only on Windows (via DXGI); None on every other platform.
PresentationTimestamp
Nanosecond timestamp used by the presentation engine.
SurfaceCapabilities
Defines the capabilities of a given surface and adapter.
SurfaceColorSpaces
A set of SurfaceColorSpaces supported by a surface for a particular texture format.
SurfaceConfiguration
Configures a Surface for presentation.
SurfaceFormatCapabilities
A texture format supported by a surface, together with the color spaces in which the surface can present it.

Enums§

CompositeAlphaMode
Specifies how the alpha channel of the textures should be handled during compositing.
DisplayGamut
Coarse gamut classification, mirroring CSS color-gamut.
PresentMode
Timing and queueing with which frames are actually displayed to the user.
SurfaceColorSpace
The color space in which the presentation engine interprets the values written to a surface texture.
SurfaceStatus
Status of the received surface image.