mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-20 06:46:26 -04:00
config: tweak.surface-bit-depth: add support for 16f surfaces
This adds supports for 16F surfaces (i.e. 16-bit floating point). We haven't been able to support this until now, since there were no corresponding pixman image type. Now there is. Use the new 16f surfaces by default, when gamma-correct-blending=yes.
This commit is contained in:
parent
7354b94f73
commit
8faea42d9e
9 changed files with 88 additions and 25 deletions
13
sixel.c
13
sixel.c
|
|
@ -113,7 +113,18 @@ sixel_init(struct terminal *term, int p1, int p2, int p3)
|
|||
term->sixel.linear_blending = wayl_do_linear_blending(term->wl, term->conf);
|
||||
term->sixel.pixman_fmt = PIXMAN_a8r8g8b8;
|
||||
|
||||
if (term->conf->tweak.surface_bit_depth == SHM_BITS_10) {
|
||||
/*
|
||||
* Use higher-precision sixel surfaces if we're using
|
||||
* higher-precision window surfaces.
|
||||
*
|
||||
* This is to a) get more accurate colors when doing gamma-correct
|
||||
* blending, and b) use the same pixman format as the main
|
||||
* surfaces, for (hopefully) better performance.
|
||||
*
|
||||
* For now, don't support 16f surfaces (too much sixel logic that
|
||||
* assumes 32-bit pixels).
|
||||
*/
|
||||
if (shm_chain_bit_depth(term->render.chains.grid) >= SHM_BITS_10) {
|
||||
if (term->wl->shm_have_argb2101010 && term->wl->shm_have_xrgb2101010) {
|
||||
term->sixel.use_10bit = true;
|
||||
term->sixel.pixman_fmt = PIXMAN_a2r10g10b10;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue