Skip to main content

Module present

Module present 

Source
Expand description

Showing video_present frames: the letterbox and the upscaling filters (design/presentation.md). Display only: hashes are taken from the guest’s bytes before any of this runs.

Structs§

Present
The user’s display settings for 2D frames.
Presenter
GPU side of showing 2D frames: one pipeline per filter pass, the frame texture, the intermediate image of two-pass filters and two uniforms with the sizes (for the pass into the output, and for a first pass into mid).
VideoFrame
A video_present frame to show: tightly packed RGBA rows and its display aspect.

Enums§

Filter
How a 2D frame is scaled to the output.

Functions§

letterbox
Where a fw×fh frame lands in a dw×dh output: (left, top, scale x, scale y), centred. integer_scale: whole multiples only (of the height), when the frame fits; aspect: the frame’s display aspect num:den (video_set_aspect), None for square pixels. The pointer’s frame position undoes exactly this (host::frame_position); same arithmetic in runners/web/lib/input.js.