mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
render: add render_row()
This commit is contained in:
parent
a712ca40e1
commit
bb3e33948f
1 changed files with 13 additions and 7 deletions
20
render.c
20
render.c
|
|
@ -344,6 +344,18 @@ grid_render_scroll_reverse(struct terminal *term, struct buffer *buf,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
render_row(struct terminal *term, struct buffer *buf, struct row *row, int row_no)
|
||||
{
|
||||
for (int col = 0; col < term->cols; col++)
|
||||
render_cell(term, buf, &row->cells[col], col, row_no, false);
|
||||
|
||||
wl_surface_damage_buffer(
|
||||
term->wl.surface,
|
||||
0, row_no * term->cell_height,
|
||||
term->width, term->cell_height);
|
||||
}
|
||||
|
||||
static void frame_callback(
|
||||
void *data, struct wl_callback *wl_callback, uint32_t callback_data);
|
||||
|
||||
|
|
@ -451,16 +463,10 @@ grid_render(struct terminal *term)
|
|||
|
||||
//LOG_WARN("rendering line: %d", r);
|
||||
|
||||
for (int col = 0; col < term->cols; col++)
|
||||
render_cell(term, buf, &row->cells[col], col, r, false);
|
||||
|
||||
row->dirty = false;
|
||||
all_clean = false;
|
||||
|
||||
wl_surface_damage_buffer(
|
||||
term->wl.surface,
|
||||
0, r * term->cell_height,
|
||||
term->width, term->cell_height);
|
||||
render_row(term, buf, row, r);
|
||||
}
|
||||
|
||||
if (term->blink.active) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue