server: Fix alloc_lz_image_surface stride allocations

All lz surfaces are not 4 bytes per pixel, calculate the right stride
based on the pixman format.
This commit is contained in:
Alexander Larsson 2010-08-25 16:44:16 +02:00
parent f912ffbc2a
commit 698d0e471a

View File

@ -290,7 +290,7 @@ pixman_image_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data,
int stride;
pixman_image_t *surface = NULL;
stride = (gross_pixels / height) * 4;
stride = (gross_pixels / height) * (PIXMAN_FORMAT_BPP (pixman_format) / 8);
if (!top_down) {
stride = -stride;