mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
render: performance: don't stack allocate glyph sequence
This commit is contained in:
parent
00c5b27bfa
commit
050f7ea6ea
1 changed files with 4 additions and 1 deletions
5
render.c
5
render.c
|
|
@ -30,6 +30,8 @@ struct glyph_sequence {
|
|||
struct rgba foreground;
|
||||
};
|
||||
|
||||
static struct glyph_sequence gseq;
|
||||
|
||||
static void
|
||||
grid_render_update(struct terminal *term, struct buffer *buf, const struct damage *dmg)
|
||||
{
|
||||
|
|
@ -52,7 +54,8 @@ grid_render_update(struct terminal *term, struct buffer *buf, const struct damag
|
|||
|
||||
const int cols = term->cols;
|
||||
|
||||
struct glyph_sequence gseq = {.g = gseq.glyphs};
|
||||
gseq.g = gseq.glyphs;
|
||||
gseq.count = 0;
|
||||
|
||||
for (int linear_cursor = start,
|
||||
row = ((start - term->grid->offset) % term->grid->size) / cols,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue