stride is in FbBits-sized chunks, but xoff is not.

Fixes corruption problems with composite rendering to redirected windows in
depth 16.
This commit is contained in:
Aaron Plattner 2007-08-16 17:43:29 -07:00
parent 32666d7722
commit 6a32a96d8d

View File

@ -291,9 +291,9 @@ create_bits_picture (PicturePtr pict,
pixman_image_t *image;
fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
bits += yoff * stride + xoff;
bits = (CARD8*)bits + yoff * stride * sizeof(FbBits) + xoff * (bpp / 8);
image = pixman_image_create_bits (
pict->format,
pict->pDrawable->width, pict->pDrawable->height,