From 701f6362936eaf0f9a3c957108b5125218e2b04f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 2 Apr 2014 19:53:59 -0500 Subject: [PATCH] gl-renderer: Fix read_pixels in the case where we have output borders Signed-off-by: Jason Ekstrand --- src/gl-renderer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gl-renderer.c b/src/gl-renderer.c index dc50cb00..6ef1240b 100644 --- a/src/gl-renderer.c +++ b/src/gl-renderer.c @@ -964,6 +964,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: