mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04: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;
|
struct rgba foreground;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct glyph_sequence gseq;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
grid_render_update(struct terminal *term, struct buffer *buf, const struct damage *dmg)
|
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;
|
const int cols = term->cols;
|
||||||
|
|
||||||
struct glyph_sequence gseq = {.g = gseq.glyphs};
|
gseq.g = gseq.glyphs;
|
||||||
|
gseq.count = 0;
|
||||||
|
|
||||||
for (int linear_cursor = start,
|
for (int linear_cursor = start,
|
||||||
row = ((start - term->grid->offset) % term->grid->size) / cols,
|
row = ((start - term->grid->offset) % term->grid->size) / cols,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue