mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 01:08:01 +02:00
compositor: ignore useless surface_damage
If we pass negative height or width on to pixman we get error messages in the log. Also, if width or height is 0, there's no damage, so we can early return for that too. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
35da52debe
commit
57e92ed768
1 changed files with 3 additions and 0 deletions
|
|
@ -2579,6 +2579,9 @@ surface_damage(struct wl_client *client,
|
|||
{
|
||||
struct weston_surface *surface = wl_resource_get_user_data(resource);
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
return;
|
||||
|
||||
pixman_region32_union_rect(&surface->pending.damage,
|
||||
&surface->pending.damage,
|
||||
x, y, width, height);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue