[PATCH weston v4 14/15] gl-renderer: Fix read_pixels in the case where we have output borders

Jason Ekstrand jason at jlekstrand.net
Tue Feb 25 17:26:46 PST 2014


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/gl-renderer.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index d03bce6..444aa97 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -962,6 +962,10 @@ gl_renderer_read_pixels(struct weston_output *output,
 			       uint32_t width, uint32_t height)
 {
 	GLenum gl_format;
+	struct gl_output_state *go = get_output_state(output);
+	
+	x += go->borders[GL_RENDERER_BORDER_LEFT].width;
+	y += go->borders[GL_RENDERER_BORDER_BOTTOM].height;
 
 	switch (format) {
 	case PIXMAN_a8r8g8b8:
-- 
1.8.5.3



More information about the wayland-devel mailing list