summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-12-01 13:00:43 -0600
committerDerek Foreman <derekf@osg.samsung.com>2015-12-01 16:12:51 -0600
commite2e15acc06c80a6d06c8e41e4a50518a765f8a56 (patch)
tree8c01dedbfaa8ef3afc49307a16c3c27c5fc4ad9d
parent5ffbfffaf7758c33791978516d0a1100773b85e2 (diff)
compositor: change rounding in weston_surface_to_buffer_rect()
Rounding both corners of the rectangle down can result in a 0 width/height rectangle before passing to weston_transformed_rect. This showed up as missing damage in weston-simple-damage (the bouncing ball would leave green trails when --use-viewport was used) Reviewed-by: Daniel Stone <daniels@collabora.co.uk> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
-rw-r--r--src/compositor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 4895bd65..0118b67e 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -945,8 +945,8 @@ weston_surface_to_buffer_rect(struct weston_surface *surface,
rect.y1 = floorf(yf);
scaler_surface_to_buffer(surface, rect.x2, rect.y2, &xf, &yf);
- rect.x2 = floorf(xf);
- rect.y2 = floorf(yf);
+ rect.x2 = ceilf(xf);
+ rect.y2 = ceilf(yf);
return weston_transformed_rect(surface->width_from_buffer,
surface->height_from_buffer,