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

@ -634,7 +634,7 @@ static void render_pass_mark_box_updated(struct wlr_vk_render_pass *pass,
if (!pass->two_pass) {
return;
}
rect_union_add(&pass->updated_region, *box);
rect_union_add(&pass->updated_region, box);
}
static void render_pass_add_rect(struct wlr_render_pass *wlr_pass,