summaryrefslogtreecommitdiff
path: root/src/gl-renderer.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2014-04-02 19:53:59 -0500
committerKristian Høgsberg <krh@bitplanet.net>2014-04-02 21:27:46 -0700
commit701f6362936eaf0f9a3c957108b5125218e2b04f (patch)
tree59b3c1af56a78d0e365b343ba9e002f3c90a03df /src/gl-renderer.c
parent923bfe6f1f7f12d103bd8d3586c31cd62d91c8d2 (diff)
downloadweston-701f6362936eaf0f9a3c957108b5125218e2b04f.tar.gz
gl-renderer: Fix read_pixels in the case where we have output borders
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/gl-renderer.c')
-rw-r--r--src/gl-renderer.c4
1 files changed, 4 insertions, 0 deletions
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: