From 8f24156926ec8fb0d036d6a14497a742bdc72d69 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 2 Jul 2012 17:33:40 +0100 Subject: [PATCH] compositor: Correctly calculate changed sub image rectangle When calling glTexSubImage2D for sub image updates for SHM surfaces the changed rectangle was being wrongly calculated. This resulted in interesting redraw artefacts for clients using SHM. --- src/compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index bdcc2cdf..677b5c89 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1001,7 +1001,7 @@ update_shm_texture(struct weston_surface *surface) glPixelStorei(GL_UNPACK_SKIP_ROWS, rectangles[i].y1); glTexSubImage2D(GL_TEXTURE_2D, 0, rectangles[i].x1, rectangles[i].y1, - rectangles[i].x2 - rectangles[i].y1, + rectangles[i].x2 - rectangles[i].x1, rectangles[i].y2 - rectangles[i].y1, GL_BGRA_EXT, GL_UNSIGNED_BYTE, data); }