Fix formatting

This commit is contained in:
lilyyy411 2026-05-16 04:49:12 +02:00
parent 3113c1b895
commit 5317300015

View file

@ -1203,13 +1203,11 @@ draw_cursor:
return cell_cols; return cell_cols;
} }
#define MAX_REASONABLE_DAMAGE_PER_WORKER 32
static pixman_box32_t encompass_boxes(const pixman_box32_t* restrict b1, const pixman_box32_t* restrict b2) { static pixman_box32_t encompass_boxes(const pixman_box32_t* restrict b1, const pixman_box32_t* restrict b2) {
return (pixman_box32_t){min(b1->x1, b2->x1), min(b1->y1, b2->y1), max(b1->x2, b2->x2), max(b1->y2, b2->y2)}; return (pixman_box32_t){min(b1->x1, b2->x1), min(b1->y1, b2->y1), max(b1->x2, b2->x2), max(b1->y2, b2->y2)};
} }
/* /*
* Needs tuning. This is the number of damage rectangles * Needs tuning. This is the number of damage rectangles
* that each worker should be able to attach that then get merged * that each worker should be able to attach that then get merged
@ -1217,6 +1215,7 @@ static pixman_box32_t encompass_boxes(const pixman_box32_t* restrict b1, const p
* are attached to the surface's pending buffer, performance starts to degrade, * are attached to the surface's pending buffer, performance starts to degrade,
* or even worse, you reach an internal Wayland limit and Wayland errors * or even worse, you reach an internal Wayland limit and Wayland errors
*/ */
#define MAX_REASONABLE_DAMAGE_PER_WORKER 32
static void greedily_fix_damage(pixman_region32_t* damage) { static void greedily_fix_damage(pixman_region32_t* damage) {
int n_rects = 0; int n_rects = 0;
@ -1227,6 +1226,7 @@ static void greedily_fix_damage(pixman_region32_t* damage) {
pixman_region32_t new_region; pixman_region32_t new_region;
int num_out = 0; int num_out = 0;
/* /*
* Greedily merge damage rectangles with their right neighbor * Greedily merge damage rectangles with their right neighbor
* if there is one. * if there is one.
@ -1242,11 +1242,13 @@ static void greedily_fix_damage(pixman_region32_t* damage) {
pixman_region32_fini(damage); pixman_region32_fini(damage);
*damage = new_region; *damage = new_region;
} }
/* /*
* The maximum number of damage rectangles that any given row's * The maximum number of damage rectangles that any given row's
* damage should be split into. Needs proper tuning. * damage should be split into. Needs proper tuning.
*/ */
#define MAX_DAMAGE_RECTS_PER_ROW 8 #define MAX_DAMAGE_RECTS_PER_ROW 8
static void static void
render_row(struct terminal *term, pixman_image_t *pix, render_row(struct terminal *term, pixman_image_t *pix,
pixman_region32_t *damage, struct row *row, pixman_region32_t *damage, struct row *row,