diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2007-08-16 17:43:29 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-08-23 12:19:25 -0700 |
commit | 71ddf917d7449b721582c910c5026faa457597fe (patch) | |
tree | 1af2da3d571cc62a6e0b581b5d1692ec333c35d8 /fb/fbpict.c | |
parent | 7cc53ae10adb7f8bb59f904b1362b7391b327f83 (diff) |
stride is in FbBits-sized chunks, but xoff is not.
Fixes corruption problems with composite rendering to redirected windows in
depth 16.
(cherry picked from commit 6a32a96d8df184c3ace4847beb48fdcb846d2286)
Diffstat (limited to 'fb/fbpict.c')
-rw-r--r-- | fb/fbpict.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fb/fbpict.c b/fb/fbpict.c index 4d1ad0b10..8a146ddaa 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -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, |