mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
wlr_damage_ring: Clamp damage region to buffer size
This commit is contained in:
parent
9904f160af
commit
fbafd8ed94
1 changed files with 2 additions and 0 deletions
|
|
@ -116,6 +116,8 @@ void wlr_damage_ring_rotate_buffer(struct wlr_damage_ring *ring,
|
|||
continue;
|
||||
}
|
||||
|
||||
pixman_region32_intersect_rect(damage, damage, 0, 0, buffer->width, buffer->height);
|
||||
|
||||
// Check the number of rectangles
|
||||
int n_rects = pixman_region32_n_rects(damage);
|
||||
if (n_rects > WLR_DAMAGE_RING_MAX_RECTS) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue