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
11
config.c
11
config.c
|
|
@ -2809,12 +2809,21 @@ parse_section_tweak(struct context *ctx)
|
|||
|
||||
else if (streq(key, "surface-bit-depth")) {
|
||||
_Static_assert(sizeof(conf->tweak.surface_bit_depth) == sizeof(int),
|
||||
"enum is not 32-bit");
|
||||
"enum is not 32-bit");
|
||||
|
||||
/* TODO: check which version PIXMAN_rgba_float16 ended up in;
|
||||
guessing 0.47.0, but PR is currently stuck at 0.44.3 */
|
||||
#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0, 44, 3)
|
||||
return value_to_enum(
|
||||
ctx,
|
||||
(const char *[]){"auto", "8-bit", "10-bit", "16f-bit", NULL},
|
||||
(int *)&conf->tweak.surface_bit_depth);
|
||||
#else
|
||||
return value_to_enum(
|
||||
ctx,
|
||||
(const char *[]){"auto", "8-bit", "10-bit", NULL},
|
||||
(int *)&conf->tweak.surface_bit_depth);
|
||||
#endif
|
||||
}
|
||||
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue