From d8e8271e94286ee1d7dbf10a4a29d8b854b63a55 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 7 Nov 2012 17:51:43 +1100 Subject: [PATCH] Clip surface damage to the surface area Otherwise glTexSubImage2D will reject our co-ordinates as being out of bounds. Signed-off-by: Daniel Stone --- src/compositor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 6b0c0040..d5b13c87 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1260,8 +1260,13 @@ surface_commit(struct wl_client *client, struct wl_resource *resource) surface->pending.sy); /* wl_surface.damage */ + pixman_region32_init_rect(&opaque, 0, 0, + surface->geometry.width, + surface->geometry.height); pixman_region32_union(&surface->damage, &surface->damage, &surface->pending.damage); + pixman_region32_intersect(&surface->damage, &surface->damage, + &opaque); empty_region(&surface->pending.damage); /* wl_surface.set_opaque_region */