wlroots/include/util
Kenny Levinsen 57441ded02 util/rect_union: Limit rect_union_add to 1024 rects
If a very large number of clip rects are accumulated in rect_union_add,
rect_union_evaluate can end up being disproportionately expensive, and
as an extreme numbers of clip rects are not beneficial for drawing, this
is without any benefit.

Limit the number of rects to 1024 in rect_union_add, switching over to
bounding box mode instead when the limit is exceeded. This leads to a
small 70% reduction in CPU time in the Vulkan renderer on the
stacked/clip200/1024 benchmarks.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
2026-05-01 12:50:04 +00:00
..
array.h util/array: unclutter 2022-08-29 13:48:42 +00:00
env.h util/env: make env_parse_switch() return a size_t 2022-12-06 16:14:18 +01:00
global.h util/global: remove wl_display arg from wlr_global_destroy_safe 2021-12-14 13:13:50 +00:00
matrix.h util/matrix: add matrix_invert() 2025-03-30 16:21:26 +02:00
mem.h util/mem: Move memdup to new util/mem.c file 2025-07-17 16:39:58 +01:00
rect_union.h util/rect_union: Limit rect_union_add to 1024 rects 2026-05-01 12:50:04 +00:00
set.h util/set: overhaul 2022-08-29 13:48:42 +00:00
shm.h Add some missing includes/declarations 2023-06-05 21:06:19 +00:00
time.h util/time: Move NSEC_PER_SEC to header 2024-11-07 10:22:56 +01:00
token.h util/token: add docs 2023-10-26 16:30:12 +00:00
utf8.h xdg-toplevel: check that title provided actually is UTF-8 2023-11-22 22:03:00 +03:00