Expand description
The two raster buffers the engine and the backends share: Pixmap, a
premultiplied RGBA8 image, and AlphaMask, an 8-bit coverage plane.
Part of the backend seam. Both are in
RasterBackend’s own signatures; the alpha
arithmetic beside them — mul255, alpha_merge,
alpha_byte_truncating — is here because a backend must round its
alpha the way the oracle rounds it. The oracle’s own buffers are
straight (non-premultiplied) and ours are premultiplied, and the
conversions that forces are owned here rather than in a backend, so the
engine’s arithmetic stays bit-identical whichever rasterizer is in use.
Structs§
- Alpha
Mask - An 8-bit coverage plane: one byte per pixel,
255fully opaque. - Pixmap
- A premultiplied RGBA8 image: four bytes per pixel, row-major, no padding.
Functions§
- alpha_
byte_ truncating alpha * 255cast to an integer: truncating, soca 0.5is127.- alpha_
merge AlphaMerge(d, s, a) = (d*(255-a) + s*a) / 255, truncating and unclamped.- mul255
a * b / 255, truncating — the oracle’s ubiquitous 8-bit product.