From 3d66db63ccb1baab2d78e6d104a9c15d3f6684d1 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 10 Feb 2025 08:57:51 +0100 Subject: 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. --- grid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grid.h') diff --git a/grid.h b/grid.h index de8f98ab..71bdc29e 100644 --- a/grid.h +++ b/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]); -- cgit v1.3