diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-10 17:21:49 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-10 17:21:49 +0000 |
| commit | 1a21a5fb29e3db6b442d8af8564ee7655fa77ecd (patch) | |
| tree | 62759dd3093e9851c6406f4fa2281c6066ebcd8a /terminal.h | |
| parent | scrollback: in debug, verify all rows in the view are initialized (diff) | |
| parent | terminal: scrolling: prefetch cells of scrolled in lines (diff) | |
Merge branch 'cache-optimize'
Diffstat (limited to 'terminal.h')
| -rw-r--r-- | terminal.h | 23 |
1 files changed, 8 insertions, 15 deletions
@@ -38,37 +38,30 @@ struct wayland { bool have_argb8888; }; -struct rgb { double r, g, b; } __attribute__((packed)); +struct rgb { float r, g, b; } __attribute__((packed)); +/* + * Note: we want the cells to be as small as possible. Larger cells + * means fewer scrollback lines (or performance drops due to cache + * misses) */ struct attributes { -#if 0 - bool bold; - bool italic; - bool underline; - bool strikethrough; - bool blink; - bool conceal; - bool reverse; - bool have_foreground; - bool have_background; -#else uint8_t bold:1; uint8_t italic:1; uint8_t underline:1; uint8_t strikethrough:1; - uint8_t blink:1; + //uint8_t blink:1; /* Not supported yet, and removing it means all other attributes fit in a single uint8_t */ uint8_t conceal:1; uint8_t reverse:1; uint8_t have_foreground:1; uint8_t have_background:1; -#endif + struct rgb foreground; /* Only valid when have_foreground == true */ struct rgb background; /* Only valid when have_background == true */ } __attribute__((packed)); struct cell { struct attributes attrs; - char c[5]; + char c[4]; } __attribute__((packed)); struct scroll_region { |
