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:
Daniel Eklöf 2019-07-16 13:17:51 +02:00
parent 2a1c4d29e9
commit ccc8ef9606
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 123 additions and 62 deletions

View file

@ -72,10 +72,9 @@ erase_cell_range(struct terminal *term, struct row *row, int start, int end)
assert(start < term->cols);
assert(end < term->cols);
if (unlikely(term->vt.attrs.have_background)) {
if (unlikely(term->vt.attrs.background >> 31)) {
for (int col = start; col <= end; col++) {
row->cells[col].c[0] = '\0';
row->cells[col].attrs.have_background = true;
row->cells[col].attrs.background = term->vt.attrs.background;
}
} else {