wlroots/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
..
addon.c util/addon: make wlr_addon_set_finish() safer 2023-10-08 11:06:09 +00:00
array.c treewide: fix typos 2026-02-28 04:26:47 -03:00
box.c util/box: Add wlr_box_intersects 2026-03-09 22:09:40 +00:00
env.c util/env: make env_parse_switch() return a size_t 2022-12-06 16:14:18 +01:00
global.c util/global: fix memory leak on display destroy in wlr_global_destroy_safe 2022-06-07 18:18:11 +02:00
log.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
matrix.c util/matrix: add matrix_invert() 2025-03-30 16:21:26 +02:00
mem.c util/mem: Move memdup to new util/mem.c file 2025-07-17 16:39:58 +01:00
meson.build Add wlr_version_get_{major,minor,micro}() 2025-12-13 11:06:28 +00:00
rect_union.c util/rect_union: Limit rect_union_add to 1024 rects 2026-05-01 12:50:04 +00:00
region.c util/region: forbid "shrinking" a region with wlr_region_expand() 2022-12-09 16:46:36 +00:00
set.c util/set: overhaul 2022-08-29 13:48:42 +00:00
shm.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
time.c util/time: Move NSEC_PER_SEC to header 2024-11-07 10:22:56 +01:00
token.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
transform.c util/transform: add wlr_output_transform_coords() 2023-11-23 11:07:34 +01:00
utf8.c xdg-toplevel: check that title provided actually is UTF-8 2023-11-22 22:03:00 +03:00
version.c Add wlr_version_get_{major,minor,micro}() 2025-12-13 11:06:28 +00:00