mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-11 05:33:55 -04:00
terminal: foreground/background in cell attributes are now uint32_t
This reduces the cell size, and thus improves the cache behavour
This commit is contained in:
parent
2a1c4d29e9
commit
ccc8ef9606
5 changed files with 123 additions and 62 deletions
12
terminal.h
12
terminal.h
|
|
@ -55,14 +55,12 @@ struct attributes {
|
|||
uint8_t italic:1;
|
||||
uint8_t underline:1;
|
||||
uint8_t strikethrough:1;
|
||||
//uint8_t blink:1; /* Not supported yet, and removing it means all other attributes fit in a single uint8_t */
|
||||
uint8_t blink:1;
|
||||
uint8_t conceal:1;
|
||||
uint8_t reverse:1;
|
||||
uint8_t have_foreground:1;
|
||||
uint8_t have_background:1;
|
||||
|
||||
struct rgb foreground; /* Only valid when have_foreground == true */
|
||||
struct rgb background; /* Only valid when have_background == true */
|
||||
uint32_t foreground;
|
||||
uint32_t background;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct cell {
|
||||
|
|
@ -236,8 +234,8 @@ struct terminal {
|
|||
bool print_needs_wrap;
|
||||
struct scroll_region scroll_region;
|
||||
|
||||
struct rgb foreground;
|
||||
struct rgb background;
|
||||
uint32_t foreground;
|
||||
uint32_t background;
|
||||
|
||||
struct {
|
||||
int col;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue