xserver: Branch 'master'

Eric Anholt anholt at kemper.freedesktop.org
Tue Jun 20 02:48:44 EEST 2006


 fb/fbcompose.c |    9 +++++++++
 1 files changed, 9 insertions(+)

New commits:
diff-tree 569c808a2375be71f835ee8693605487484bd22e (from 55426650417df4ec22ea0e2a67f6074f0ac1d54e)
Author: Eric Anholt <anholt at FreeBSD.org>
Date:   Mon Jun 19 16:42:09 2006 -0700

    Fix crash when using PICT_x4a4 by supplying an appropriate fbFetchPixel_x4a4.

diff --git a/fb/fbcompose.c b/fb/fbcompose.c
index 771245e..41fff7b 100644
--- a/fb/fbcompose.c
+++ b/fb/fbcompose.c
@@ -849,6 +849,14 @@ fbFetchPixel_c8 (const FbBits *bits, int
     return indexed->rgba[pixel];
 }
 
+static FASTCALL CARD32
+fbFetchPixel_x4a4 (const FbBits *bits, int offset, miIndexedPtr indexed)
+{
+    CARD32   pixel = ((CARD8 *) bits)[offset];
+
+    return ((pixel & 0xf) | ((pixel & 0xf) << 4)) << 24;
+}
+
 #define Fetch8(l,o)    (((CARD8 *) (l))[(o) >> 2])
 #if IMAGE_BYTE_ORDER == MSBFirst
 #define Fetch4(l,o)    ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
@@ -988,6 +996,7 @@ static fetchPixelProc fetchPixelProcForP
     case PICT_a2b2g2r2: return fbFetchPixel_a2b2g2r2;
     case PICT_c8: return  fbFetchPixel_c8;
     case PICT_g8: return  fbFetchPixel_c8;
+    case PICT_x4a4: return fbFetchPixel_x4a4;
 
         /* 4bpp formats */
     case PICT_a4: return  fbFetchPixel_a4;



More information about the xorg-commit mailing list