Skip to main content

Module coverage

Module coverage 

Source
Expand description

A8 coverage tiles for the software backend.

A text layer’s fill and outline are rasterized to 8-bit coverage once, then composited with the current colour/alpha at the current screen position. This separates the expensive vector rasterization (which depends only on the glyph geometry) from the cheap per-frame compositing (which carries colour, alpha and position). Layers whose geometry is unchanged between frames — the common animated case (\move, \fad, colour \t, karaoke) — can then reuse a cached tile and only re-composite, the way libass does, instead of re-rasterizing every frame.

Structs§

CoverageTile
An 8-bit coverage tile: width * height alpha samples, row-major.

Enums§

RenderBitmap
A positioned bitmap — the renderer’s libass-ASS_Image-style output unit. A frame is a list of these; the caller (or composite_bitmap) blends them.

Functions§

composite
Composite an A8 coverage tile at (x, y) in color (see the private composite_coverage helper).
composite_bitmap
Composite a RenderBitmap at its own position onto a premultiplied-RGBA8 frame buffer with source-over blending.