xserver: Branch 'master'

Aaron Plattner aplattner at kemper.freedesktop.org
Thu Aug 16 17:44:22 PDT 2007


 fb/fbpict.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
diff-tree 6a32a96d8df184c3ace4847beb48fdcb846d2286 (from 32666d77227fcd2c066de16bf3c07366f92b0457)
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Thu Aug 16 17:43:29 2007 -0700

    stride is in FbBits-sized chunks, but xoff is not.
    
    Fixes corruption problems with composite rendering to redirected windows in
    depth 16.

diff --git a/fb/fbpict.c b/fb/fbpict.c
index 4d1ad0b..8a146dd 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,


More information about the xorg-commit mailing list