summaryrefslogtreecommitdiff
path: root/src/screenshooter.c
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2013-01-06 12:12:40 +0300
committerKristian Høgsberg <krh@bitplanet.net>2013-01-07 09:40:42 -0500
commit094ca1d1edb393ab3797d6e922e7c8c54d3defcf (patch)
tree8b89a85b6213c08a322b8e65c6b07706b7268a44 /src/screenshooter.c
parente565b405695d2dbcfbf0fd228fe8885ff522ae84 (diff)
downloadweston-094ca1d1edb393ab3797d6e922e7c8c54d3defcf.tar.gz
screenshoter: don't use hardcoded bpp value
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Diffstat (limited to 'src/screenshooter.c')
-rw-r--r--src/screenshooter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screenshooter.c b/src/screenshooter.c
index 840dfb8d..662aad4f 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -103,7 +103,7 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data)
output->disable_planes--;
wl_list_remove(&listener->link);
- stride = l->buffer->width * 4;
+ stride = l->buffer->width * (PIXMAN_FORMAT_BPP(output->compositor->read_format) / 8);
pixels = malloc(stride * l->buffer->height);
if (pixels == NULL) {