mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
grid: refactor reflow
We've been trying to performance optimize reflow by "chunking" cells; try to gather as many as possible, and memcpy a chunk at once. The problem is that a) this quickly becomes very complex, and b) is very hard to get right for multi-column characters, especially when we need to truncate long ones due to the window being too small. Refactor, and once again walk and copy all cells one by one. This is slower, but at least it's correct.
This commit is contained in:
parent
c63202ee0e
commit
3d66db63cc
3 changed files with 88 additions and 151 deletions
2
grid.h
2
grid.h
|
|
@ -16,7 +16,7 @@ void grid_resize_without_reflow(
|
|||
int old_screen_rows, int new_screen_rows);
|
||||
|
||||
void grid_resize_and_reflow(
|
||||
struct grid *grid, int new_rows, int new_cols,
|
||||
struct grid *grid, const struct terminal *term, int new_rows, int new_cols,
|
||||
int old_screen_rows, int new_screen_rows,
|
||||
size_t tracking_points_count,
|
||||
struct coord *const _tracking_points[static tracking_points_count]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue