diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-06 16:31:14 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-06 16:31:14 +0000 |
| commit | 050f7ea6ea4fe8edadd4773af309ac1c0354d38c (patch) | |
| tree | e42727fdd5d1dccc5e74936dd613939de06f51dd /render.c | |
| parent | vt: add branch hinting to PRINT action (diff) | |
render: performance: don't stack allocate glyph sequence
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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, |
