util/rect_union: Take pixman_box32_t by pointer

rect_union_add takes a pixman_box32_t by value, and passes it along by
value to internal helpers. render_pass_mark_box_updated which is the
only caller receives the pixman_box32_t by reference, so just plumb it
through that way.

Results in a 13% improvement in CPU time when using the Vulkan renderer
on the stacked/clip200/1024 benchmarks on my machine.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
This commit is contained in:
Kenny Levinsen 2026-04-23 16:47:40 +02:00 committed by Félix Poisot
parent 8abe53d1d2
commit 17c29268c9
3 changed files with 12 additions and 12 deletions

View file

@ -58,7 +58,7 @@ void rect_union_finish(struct rect_union *r);
*
* Amortized time: O(1)
*/
void rect_union_add(struct rect_union *r, pixman_box32_t box);
void rect_union_add(struct rect_union *r, const pixman_box32_t *box);
/**
* Compute an exact cover of the rectangles added so far, and return