mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-08 11:18:43 +02:00
compositor: Use pixman_region32_intersect_rect() instead of temp region
We avoid reusing 'opaque' and don't leak the region.
This commit is contained in:
parent
b4f4a5980f
commit
4d0214c62b
1 changed files with 4 additions and 5 deletions
|
|
@ -1262,13 +1262,12 @@ surface_commit(struct wl_client *client, struct wl_resource *resource)
|
|||
surface->pending.sy = 0;
|
||||
|
||||
/* wl_surface.damage */
|
||||
pixman_region32_init_rect(&opaque, 0, 0,
|
||||
surface->geometry.width,
|
||||
surface->geometry.height);
|
||||
pixman_region32_union(&surface->damage, &surface->damage,
|
||||
&surface->pending.damage);
|
||||
pixman_region32_intersect(&surface->damage, &surface->damage,
|
||||
&opaque);
|
||||
pixman_region32_intersect_rect(&surface->damage, &surface->damage,
|
||||
0, 0,
|
||||
surface->geometry.width,
|
||||
surface->geometry.height);
|
||||
empty_region(&surface->pending.damage);
|
||||
|
||||
/* wl_surface.set_opaque_region */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue