|
ginnOS
The reference: libc, the libraries and the kernel
|
bragi: the glyph cache of a face, and blending glyph masks. More...
Functions | |
| const bragi_glyph_t * | bragi_glyph (bragi_face_t *face, int glyph, int subpixel) |
| a glyph image from the cache, made if it is not there. | |
| void | bragi_blend_mask (gfx_buffer_t *buf, int32_t x, int32_t y, const uint8_t *mask, int32_t width, int32_t height, int32_t stride, gfx_color_t color) |
| blend a coverage mask in a colour over buf (in sRGB, as browsers do). | |
| void | bragi_test_set_budget (bragi_face_t *face, uint32_t budget) |
| for the host tests: set a face's cache budget. | |
bragi: the glyph cache of a face, and blending glyph masks.
each face keeps the glyph images it made, by glyph and subpixel position, in a hash table. a list in use order lets the cache drop the glyph used least recently when the masks use more than the budget.
| const bragi_glyph_t * bragi_glyph | ( | bragi_face_t * | face, |
| int | glyph, | ||
| int | subpixel ) |
a glyph image from the cache, made if it is not there.
| subpixel | 0 to BRAGI_SUBPIXELS - 1. |
| void bragi_blend_mask | ( | gfx_buffer_t * | buf, |
| int32_t | x, | ||
| int32_t | y, | ||
| const uint8_t * | mask, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| int32_t | stride, | ||
| gfx_color_t | color ) |
blend a coverage mask in a colour over buf (in sRGB, as browsers do).
| color | premultiplied; its alpha scales the coverage. |
| void bragi_test_set_budget | ( | bragi_face_t * | face, |
| uint32_t | budget ) |
for the host tests: set a face's cache budget.