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>
diff --git a/src/compositor.c b/src/compositor.c
index 5fa30cb..65abb72 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2579,6 +2579,9 @@
 {
 	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);