summaryrefslogtreecommitdiff
path: root/lib/igt_chamelium.c
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@linux.intel.com>2017-06-16 17:19:02 +0300
committerLyude <lyude@redhat.com>2017-06-16 14:57:27 -0400
commitdb54f9891f10bc90da26a6cbf198577f0ee99803 (patch)
treee14dd23270dac103dd3acf0c942026ac9b6b2fc0 /lib/igt_chamelium.c
parentdf682176524f034a1cecee457152f87e63f65113 (diff)
lib/igt_chamelium: Create pixman image with bytes per pixel, not bits
The pixman_image_create_bits function expects bytes per pixels as fifth argument, not bits per pixels. This divides the PIXMAN_FORMAT_BPP macro's result by 8 to get it in bytes per pixels instead of bits per pixels. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'lib/igt_chamelium.c')
-rw-r--r--lib/igt_chamelium.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 2315ce60..4a2af796 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -967,7 +967,7 @@ static pixman_image_t *convert_frame_format(pixman_image_t *src,
int w = pixman_image_get_width(src), h = pixman_image_get_height(src);
converted = pixman_image_create_bits(format, w, h, NULL,
- PIXMAN_FORMAT_BPP(format) * w);
+ PIXMAN_FORMAT_BPP(format) / 8 * w);
pixman_image_composite(PIXMAN_OP_ADD, src, NULL, converted,
0, 0, 0, 0, 0, 0, w, h);