[PATCH weston 08/11] compositor: ignore surface_damage with negative height or width
Bill Spitzak
spitzak at gmail.com
Wed Nov 18 17:33:14 PST 2015
On Wed, Nov 18, 2015 at 2:32 PM, Derek Foreman <derekf at osg.samsung.com>
wrote:
> If we pass negative height or width on to pixman we get error messages
> in the log.
>
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
> src/compositor.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index 666bc15..0efb325 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -2574,6 +2574,9 @@ surface_damage(struct wl_client *client,
> {
> struct weston_surface *surface =
> wl_resource_get_user_data(resource);
>
> + if (width < 0 || height < 0)
> + return;
>
Might as well quit on <= 0 here, since a zero-sized rectangle won't do
anything.
> pixman_region32_union_rect(&surface->pending.damage,
> &surface->pending.damage,
> x, y, width, height);
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151118/30450be2/attachment.html>
More information about the wayland-devel
mailing list