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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user