Documentation
¶
Overview ¶
Package pacing tells whether frames of native UI wait for the display.
They do, unless GOLET_UNCAPPED asks otherwise: a frame that follows another draws at the display's next refresh, as the display link, GTK's frame clock or the swap chain's room says, and so every scene cheaper than a refresh shows the display's rate. Uncapped, as benchmarks, profilers and apps that want the least latency ask for, the next frame starts as soon as the last was presented, and the frame rate tells how much of a refresh a scene leaves. An idle window still draws nothing: only the frames asked for come sooner. The window host (package ui), the backends and the GPU renderers read Uncapped, each where it waits for the display; "Frame pacing" in docs/ui/rendering.md tells what each platform does.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Uncapped = uncapped(os.Getenv("GOLET_UNCAPPED"), runtime.GOOS)
Uncapped tells that GOLET_UNCAPPED asked frames to present without waiting for the display. It is read once, as the program starts; in browsers, whose requestAnimationFrame paces frames and nothing presents sooner, it stays false. Tests set it.
Functions ¶
Types ¶
This section is empty.