Expand description
Messages on the control channel between an app and its render service.
The channel is small and ordered: frames themselves travel through the
ring (shm), and the control channel says where (“frame N is at offset O”)
and what became of them (“frame N is in buffer B”, “frame N was
dropped, because …”, “frame N was presented at T”). Descriptors ride along
where a message names one: the ring with the hello, an image’s memfd with
its registration, the render buffers with their announcement.
Messages are postcard-encoded; one message is one SOCK_SEQPACKET packet.
Structs§
- Dmabuf
Format - A buffer format both the compositor and the app’s surface take: a DRM fourcc and modifier, as the compositor advertised them to the app.
- Plane
- One buffer of a surface: the layout of its single plane.
- Renderer
- The device a render service draws on, in wgpu’s words (
AdapterInfo’s name, device type, backend and driver, asDebugprints the enums).
Enums§
- Alpha
Type - How an uploaded image’s alpha is encoded.
- AppMessage
- What an app sends.
- Buffer
Kind - Where a buffer’s pixels live.
- Image
Format - Pixel layout of an uploaded image.
- Refusal
- Why a frame or a request was not served.
- Service
Message - What the service sends.
Constants§
- MAX_
FONT_ PATH - Longest font path an app may name.
- MAX_
MESSAGE_ BYTES - Largest encoded message either side sends or accepts.
- MAX_
MESSAGE_ FDS - Most descriptors one message carries.