mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-04 07:15:29 -04:00
selection: store cell 'selected' state in the cells' attributes
Instead of having the renderer calculate, for each cell, whether that cell is currently selected or not, make selection_update() mark/unmark the selected cells. The renderer now only has to look at the cells' 'selected' attribute. This makes the renderer both smaller and faster.
This commit is contained in:
parent
cb9ae4f6a1
commit
f12b1473fd
3 changed files with 129 additions and 78 deletions
|
|
@ -41,7 +41,8 @@ struct attributes {
|
|||
uint32_t clean:1;
|
||||
uint32_t have_fg:1;
|
||||
uint32_t have_bg:1;
|
||||
uint32_t reserved:5;
|
||||
uint32_t selected:1;
|
||||
uint32_t reserved:4;
|
||||
uint32_t bg:24;
|
||||
};
|
||||
static_assert(sizeof(struct attributes) == 8, "bad size");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue