Index: fb.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fb.h,v retrieving revision 1.7 diff -u -d -r1.7 fb.h --- fb.h 5 Nov 2004 19:51:38 -0000 1.7 +++ fb.h 16 Mar 2005 20:45:05 -0000 @@ -27,6 +27,8 @@ #ifndef _FB_H_ #define _FB_H_ +#define FB_EXPORT __attribute__((visibility("default"))) + #include "X.h" #include "scrnintstr.h" #include "pixmap.h" Index: fballpriv.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fballpriv.c,v retrieving revision 1.3 diff -u -d -r1.3 fballpriv.c --- fballpriv.c 30 Jul 2004 20:30:51 -0000 1.3 +++ fballpriv.c 16 Mar 2005 20:45:05 -0000 @@ -39,7 +39,7 @@ } #ifndef FB_NO_WINDOW_PIXMAPS int fbWinPrivateIndex; -int fbGetWinPrivateIndex(void) +FB_EXPORT int fbGetWinPrivateIndex(void) { return fbWinPrivateIndex; } Index: fbbltone.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbbltone.c,v retrieving revision 1.2 diff -u -d -r1.2 fbbltone.c --- fbbltone.c 23 Apr 2004 19:05:14 -0000 1.2 +++ fbbltone.c 16 Mar 2005 20:45:05 -0000 @@ -77,7 +77,7 @@ #endif #if FB_SHIFT == 6 -CARD8 fb8Lane[256] = { +static const CARD8 fb8Lane[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, @@ -94,33 +94,33 @@ 242, 243, 244,245,246,247,248,249,250,251,252,253,254,255, }; -CARD8 fb16Lane[256] = { +static const CARD8 fb16Lane[256] = { 0x00, 0x03, 0x0c, 0x0f, 0x30, 0x33, 0x3c, 0x3f, 0xc0, 0xc3, 0xcc, 0xcf, 0xf0, 0xf3, 0xfc, 0xff, }; -CARD8 fb32Lane[16] = { +static const CARD8 fb32Lane[16] = { 0x00, 0x0f, 0xf0, 0xff, }; #endif #if FB_SHIFT == 5 -CARD8 fb8Lane[16] = { +static const CARD8 fb8Lane[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; -CARD8 fb16Lane[16] = { +static const CARD8 fb16Lane[16] = { 0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -CARD8 fb32Lane[16] = { +static const CARD8 fb32Lane[16] = { 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #endif -CARD8 *fbLaneTable[33] = { +static const CARD8 *fbLaneTable[33] = { 0, 0, 0, 0, 0, 0, 0, 0, fb8Lane, 0, 0, 0, 0, 0, 0, 0, fb16Lane, 0, 0, 0, 0, 0, 0, 0, Index: fbcmap.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbcmap.c,v retrieving revision 1.2 diff -u -d -r1.2 fbcmap.c --- fbcmap.c 23 Apr 2004 19:05:14 -0000 1.2 +++ fbcmap.c 16 Mar 2005 20:45:06 -0000 @@ -271,7 +271,7 @@ return nresult; } -Bool +FB_EXPORT Bool fbCreateDefColormap(ScreenPtr pScreen) { unsigned short zero = 0, ones = 0xFFFF; @@ -628,7 +628,7 @@ return miExpandDirectColors(pmap, ndef, indefs, outdefs); } -Bool +FB_EXPORT Bool fbCreateDefColormap(ScreenPtr pScreen) { return miCreateDefColormap(pScreen); Index: fbcompose.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbcompose.c,v retrieving revision 1.5 diff -u -d -r1.5 fbcompose.c --- fbcompose.c 13 Jan 2005 20:49:21 -0000 1.5 +++ fbcompose.c 16 Mar 2005 20:45:06 -0000 @@ -1,8 +1,8 @@ /* - * $XdotOrg: xc/programs/Xserver/fb/fbcompose.c,v 1.5 2005/01/13 20:49:21 sandmann Exp $ + * $XdotOrg: xc/programs/Xserver/fb/fbcompose.c,v 1.3 2004/05/12 01:49:46 anholt Exp $ * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.17tsi Exp $ * - * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -40,7 +40,7 @@ * Combine src and mask using IN */ -CARD32 +static CARD32 fbCombineMaskU (FbCompositeOperand *src, FbCompositeOperand *msk) { @@ -67,7 +67,7 @@ return m|n|o|p; } -FbCompSrc +static FbCompSrc fbCombineMaskC (FbCompositeOperand *src, FbCompositeOperand *msk) { @@ -122,7 +122,7 @@ return s; } -CARD32 +static CARD32 fbCombineMaskValueC (FbCompositeOperand *src, FbCompositeOperand *msk) { @@ -154,7 +154,7 @@ /* * Combine src and mask using IN, generating only the alpha component */ -CARD32 +static CARD32 fbCombineMaskAlphaU (FbCompositeOperand *src, FbCompositeOperand *msk) { @@ -176,7 +176,7 @@ return FbInU(x,24,a,t); } -CARD32 +static CARD32 fbCombineMaskAlphaC (FbCompositeOperand *src, FbCompositeOperand *msk) { @@ -206,7 +206,7 @@ /* * All of the composing functions */ -void +static void fbCombineClear (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -214,7 +214,7 @@ (*dst->store) (dst, 0); } -void +static void fbCombineSrcU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -222,7 +222,7 @@ (*dst->store) (dst, fbCombineMaskU (src, msk)); } -void +static void fbCombineSrcC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -230,7 +230,7 @@ (*dst->store) (dst, fbCombineMaskValueC (src, msk)); } -void +static void fbCombineDst (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -238,7 +238,7 @@ /* noop */ } -void +static void fbCombineOverU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -265,7 +265,7 @@ } } -void +static void fbCombineOverC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -294,7 +294,7 @@ } } -void +static void fbCombineOverReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -321,7 +321,7 @@ } } -void +static void fbCombineOverReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -348,7 +348,7 @@ } } -void +static void fbCombineInU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -376,7 +376,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineInC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -404,7 +404,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineInReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -432,7 +432,7 @@ } } -void +static void fbCombineInReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -460,7 +460,7 @@ } } -void +static void fbCombineOutU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -488,7 +488,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineOutC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -516,7 +516,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineOutReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -544,7 +544,7 @@ } } -void +static void fbCombineOutReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -572,7 +572,7 @@ } } -void +static void fbCombineAtopU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -593,7 +593,7 @@ (*dst->store) (dst, m|n|o|p); } -void +static void fbCombineAtopC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -617,7 +617,7 @@ (*dst->store) (dst, m|n|o|p); } -void +static void fbCombineAtopReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -638,7 +638,7 @@ (*dst->store) (dst, m|n|o|p); } -void +static void fbCombineAtopReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -661,7 +661,7 @@ (*dst->store) (dst, m|n|o|p); } -void +static void fbCombineXorU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -682,7 +682,7 @@ (*dst->store) (dst, m|n|o|p); } -void +static void fbCombineXorC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -705,7 +705,7 @@ (*dst->store) (dst, m|n|o|p); } -void +static void fbCombineAddU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -731,7 +731,7 @@ } } -void +static void fbCombineAddC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -757,7 +757,7 @@ } } -void +static void fbCombineSaturateU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -790,7 +790,7 @@ (*dst->store) (dst, m|n|o|p); } -void +static void fbCombineSaturateC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -873,7 +873,7 @@ #define CombineXor (CombineAOut|CombineBOut) /* portion covered by a but not b */ -CARD8 +static CARD8 fbCombineDisjointOutPart (CARD8 a, CARD8 b) { /* min (1, (1-b) / a) */ @@ -885,7 +885,7 @@ } /* portion covered by both a and b */ -CARD8 +static CARD8 fbCombineDisjointInPart (CARD8 a, CARD8 b) { /* max (1-(1-b)/a,0) */ @@ -898,7 +898,7 @@ return ~FbIntDiv(b,a); /* 1 - (1-b) / a */ } -void +static void fbCombineDisjointGeneralU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst, @@ -952,7 +952,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineDisjointGeneralC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst, @@ -1026,7 +1026,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineDisjointOverU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1054,7 +1054,7 @@ } } -void +static void fbCombineDisjointOverC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1063,7 +1063,7 @@ } -void +static void fbCombineDisjointInU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1071,7 +1071,7 @@ fbCombineDisjointGeneralU (src, msk, dst, CombineAIn); } -void +static void fbCombineDisjointInC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1079,7 +1079,7 @@ fbCombineDisjointGeneralC (src, msk, dst, CombineAIn); } -void +static void fbCombineDisjointInReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1087,7 +1087,7 @@ fbCombineDisjointGeneralU (src, msk, dst, CombineBIn); } -void +static void fbCombineDisjointInReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1095,7 +1095,7 @@ fbCombineDisjointGeneralC (src, msk, dst, CombineBIn); } -void +static void fbCombineDisjointOutU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1103,7 +1103,7 @@ fbCombineDisjointGeneralU (src, msk, dst, CombineAOut); } -void +static void fbCombineDisjointOutC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1111,7 +1111,7 @@ fbCombineDisjointGeneralC (src, msk, dst, CombineAOut); } -void +static void fbCombineDisjointOutReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1119,7 +1119,7 @@ fbCombineDisjointGeneralU (src, msk, dst, CombineBOut); } -void +static void fbCombineDisjointOutReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1127,7 +1127,7 @@ fbCombineDisjointGeneralC (src, msk, dst, CombineBOut); } -void +static void fbCombineDisjointAtopU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1135,7 +1135,7 @@ fbCombineDisjointGeneralU (src, msk, dst, CombineAAtop); } -void +static void fbCombineDisjointAtopC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1143,7 +1143,7 @@ fbCombineDisjointGeneralC (src, msk, dst, CombineAAtop); } -void +static void fbCombineDisjointAtopReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1151,7 +1151,7 @@ fbCombineDisjointGeneralU (src, msk, dst, CombineBAtop); } -void +static void fbCombineDisjointAtopReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1159,7 +1159,7 @@ fbCombineDisjointGeneralC (src, msk, dst, CombineBAtop); } -void +static void fbCombineDisjointXorU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1167,7 +1167,7 @@ fbCombineDisjointGeneralU (src, msk, dst, CombineXor); } -void +static void fbCombineDisjointXorC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1176,7 +1176,7 @@ } /* portion covered by a but not b */ -CARD8 +static CARD8 fbCombineConjointOutPart (CARD8 a, CARD8 b) { /* max (1-b/a,0) */ @@ -1190,7 +1190,7 @@ } /* portion covered by both a and b */ -CARD8 +static CARD8 fbCombineConjointInPart (CARD8 a, CARD8 b) { /* min (1,b/a) */ @@ -1200,7 +1200,7 @@ return FbIntDiv(b,a); /* b/a */ } -void +static void fbCombineConjointGeneralU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst, @@ -1254,7 +1254,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineConjointGeneralC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst, @@ -1328,7 +1328,7 @@ (*dst->store) (dst, s); } -void +static void fbCombineConjointOverU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1359,7 +1359,7 @@ */ } -void +static void fbCombineConjointOverC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1367,7 +1367,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineAOver); } -void +static void fbCombineConjointOverReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1375,7 +1375,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineBOver); } -void +static void fbCombineConjointOverReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1383,7 +1383,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineBOver); } -void +static void fbCombineConjointInU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1391,7 +1391,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineAIn); } -void +static void fbCombineConjointInC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1399,7 +1399,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineAIn); } -void +static void fbCombineConjointInReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1407,7 +1407,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineBIn); } -void +static void fbCombineConjointInReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1415,7 +1415,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineBIn); } -void +static void fbCombineConjointOutU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1423,7 +1423,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineAOut); } -void +static void fbCombineConjointOutC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1431,7 +1431,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineAOut); } -void +static void fbCombineConjointOutReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1439,7 +1439,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineBOut); } -void +static void fbCombineConjointOutReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1447,7 +1447,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineBOut); } -void +static void fbCombineConjointAtopU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1455,7 +1455,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineAAtop); } -void +static void fbCombineConjointAtopC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1463,7 +1463,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineAAtop); } -void +static void fbCombineConjointAtopReverseU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1471,7 +1471,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineBAtop); } -void +static void fbCombineConjointAtopReverseC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1479,7 +1479,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineBAtop); } -void +static void fbCombineConjointXorU (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1487,7 +1487,7 @@ fbCombineConjointGeneralU (src, msk, dst, CombineXor); } -void +static void fbCombineConjointXorC (FbCompositeOperand *src, FbCompositeOperand *msk, FbCompositeOperand *dst) @@ -1495,7 +1495,7 @@ fbCombineConjointGeneralC (src, msk, dst, CombineXor); } -FbCombineFunc fbCombineFuncU[] = { +static const FbCombineFunc fbCombineFuncU[] = { fbCombineClear, fbCombineSrcU, fbCombineDst, @@ -1542,7 +1542,7 @@ fbCombineConjointXorU, }; -FbCombineFunc fbCombineFuncC[] = { +static const FbCombineFunc fbCombineFuncC[] = { fbCombineClear, fbCombineSrcC, fbCombineDst, @@ -1593,21 +1593,21 @@ * All of the fetch functions */ -CARD32 +static CARD32 fbFetch_a8r8g8b8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; return ((CARD32 *)line)[offset >> 5]; } -CARD32 +static CARD32 fbFetch_x8r8g8b8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; return ((CARD32 *)line)[offset >> 5] | 0xff000000; } -CARD32 +static CARD32 fbFetch_a8b8g8r8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1619,7 +1619,7 @@ ((pixel & 0xff) << 16)); } -CARD32 +static CARD32 fbFetch_x8b8g8r8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1631,7 +1631,7 @@ ((pixel & 0xff) << 16)); } -CARD32 +static CARD32 fbFetch_r8g8b8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1649,7 +1649,7 @@ #endif } -CARD32 +static CARD32 fbFetch_b8g8r8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1667,7 +1667,7 @@ #endif } -CARD32 +static CARD32 fbFetch_r5g6b5 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1680,7 +1680,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_b5g6r5 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1693,7 +1693,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_a1r5g5b5 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1707,7 +1707,7 @@ return (a | r | g | b); } -CARD32 +static CARD32 fbFetch_x1r5g5b5 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1720,7 +1720,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_a1b5g5r5 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1734,7 +1734,7 @@ return (a | r | g | b); } -CARD32 +static CARD32 fbFetch_x1b5g5r5 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1747,7 +1747,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_a4r4g4b4 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1761,7 +1761,7 @@ return (a | r | g | b); } -CARD32 +static CARD32 fbFetch_x4r4g4b4 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1774,7 +1774,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_a4b4g4r4 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1788,7 +1788,7 @@ return (a | r | g | b); } -CARD32 +static CARD32 fbFetch_x4b4g4r4 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1801,7 +1801,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_a8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1810,7 +1810,7 @@ return pixel << 24; } -CARD32 +static CARD32 fbFetcha_a8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1821,7 +1821,7 @@ return pixel; } -CARD32 +static CARD32 fbFetch_r3g3b2 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1837,7 +1837,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_b2g3r3 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1855,7 +1855,7 @@ return (0xff000000 | r | g | b); } -CARD32 +static CARD32 fbFetch_a2r2g2b2 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1869,7 +1869,7 @@ return a|r|g|b; } -CARD32 +static CARD32 fbFetch_a2b2g2r2 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1883,7 +1883,7 @@ return a|r|g|b; } -CARD32 +static CARD32 fbFetch_c8 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1899,7 +1899,7 @@ #define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) >> 4 : Fetch8(l,o) & 0xf) #endif -CARD32 +static CARD32 fbFetch_a4 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1909,7 +1909,7 @@ return pixel << 24; } -CARD32 +static CARD32 fbFetcha_a4 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1921,7 +1921,7 @@ return pixel; } -CARD32 +static CARD32 fbFetch_r1g2b1 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1934,7 +1934,7 @@ return 0xff000000|r|g|b; } -CARD32 +static CARD32 fbFetch_b1g2r1 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1947,7 +1947,7 @@ return 0xff000000|r|g|b; } -CARD32 +static CARD32 fbFetch_a1r1g1b1 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1961,7 +1961,7 @@ return a|r|g|b; } -CARD32 +static CARD32 fbFetch_a1b1g1r1 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1975,7 +1975,7 @@ return a|r|g|b; } -CARD32 +static CARD32 fbFetch_c4 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -1984,7 +1984,7 @@ return op->indexed->rgba[pixel]; } -CARD32 +static CARD32 fbFetcha_a1 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2004,7 +2004,7 @@ return a; } -CARD32 +static CARD32 fbFetch_a1 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2022,7 +2022,7 @@ return a << 24; } -CARD32 +static CARD32 fbFetch_g1 (FbCompositeOperand *op) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2044,21 +2044,21 @@ #define Splita(v) CARD32 a = ((v) >> 24), r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff #define Split(v) CARD32 r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff -void +static void fbStore_a8r8g8b8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; ((CARD32 *)line)[offset >> 5] = value; } -void +static void fbStore_x8r8g8b8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; ((CARD32 *)line)[offset >> 5] = value & 0xffffff; } -void +static void fbStore_a8b8g8r8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2066,7 +2066,7 @@ ((CARD32 *)line)[offset >> 5] = a << 24 | b << 16 | g << 8 | r; } -void +static void fbStore_x8b8g8r8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2074,7 +2074,7 @@ ((CARD32 *)line)[offset >> 5] = b << 16 | g << 8 | r; } -void +static void fbStore_r8g8b8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2091,7 +2091,7 @@ #endif } -void +static void fbStore_b8g8r8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2108,7 +2108,7 @@ #endif } -void +static void fbStore_r5g6b5 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2119,7 +2119,7 @@ ((b >> 3) )); } -void +static void fbStore_b5g6r5 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2130,7 +2130,7 @@ ((r >> 3) )); } -void +static void fbStore_a1r5g5b5 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2142,7 +2142,7 @@ ((b >> 3) )); } -void +static void fbStore_x1r5g5b5 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2153,7 +2153,7 @@ ((b >> 3) )); } -void +static void fbStore_a1b5g5r5 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2165,7 +2165,7 @@ ((r >> 3) )); } -void +static void fbStore_x1b5g5r5 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2176,7 +2176,7 @@ ((r >> 3) )); } -void +static void fbStore_a4r4g4b4 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2188,7 +2188,7 @@ ((b >> 4) )); } -void +static void fbStore_x4r4g4b4 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2199,7 +2199,7 @@ ((b >> 4) )); } -void +static void fbStore_a4b4g4r4 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2211,7 +2211,7 @@ ((r >> 4) )); } -void +static void fbStore_x4b4g4r4 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2222,7 +2222,7 @@ ((r >> 4) )); } -void +static void fbStore_a8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2230,7 +2230,7 @@ *pixel = value >> 24; } -void +static void fbStore_r3g3b2 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2241,7 +2241,7 @@ ((b >> 6) )); } -void +static void fbStore_b2g3r3 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2252,7 +2252,7 @@ ((r >> 6) )); } -void +static void fbStore_a2r2g2b2 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2264,7 +2264,7 @@ ((b >> 6) )); } -void +static void fbStore_c8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2272,7 +2272,7 @@ *pixel = miIndexToEnt24(op->indexed,value); } -void +static void fbStore_g8 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2291,14 +2291,14 @@ (Fetch8(l,o) & 0xf0) | (v))) #endif -void +static void fbStore_a4 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; Store4(line,offset,value>>28); } -void +static void fbStore_r1g2b1 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2311,7 +2311,7 @@ Store4(line,offset,pixel); } -void +static void fbStore_b1g2r1 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2324,7 +2324,7 @@ Store4(line,offset,pixel); } -void +static void fbStore_a1r1g1b1 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2337,7 +2337,7 @@ Store4(line,offset,pixel); } -void +static void fbStore_a1b1g1r1 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2350,7 +2350,7 @@ Store4(line,offset,pixel); } -void +static void fbStore_c4 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2360,7 +2360,7 @@ Store4(line,offset,pixel); } -void +static void fbStore_g4 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2370,7 +2370,7 @@ Store4(line,offset,pixel); } -void +static void fbStore_a1 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2381,7 +2381,7 @@ *pixel = (*pixel & ~mask) | value; } -void +static void fbStore_g1 (FbCompositeOperand *op, CARD32 value) { FbBits *line = op->u.drawable.line; CARD32 offset = op->u.drawable.offset; @@ -2392,7 +2392,7 @@ *pixel = (*pixel & ~mask) | value; } -CARD32 +static CARD32 fbFetch_external (FbCompositeOperand *op) { CARD32 rgb = (*op[1].fetch) (&op[1]); @@ -2402,13 +2402,13 @@ } -CARD32 +static CARD32 fbFetcha_external (FbCompositeOperand *op) { return (*op[2].fetch) (&op[2]); } -void +static void fbStore_external (FbCompositeOperand *op, CARD32 value) { (*op[1].store) (&op[1], value | 0xff000000); @@ -2417,7 +2417,7 @@ #define dummyScreen screenInfo.screens[0] -CARD32 +static CARD32 fbFetch_transform (FbCompositeOperand *op) { PictVector v; @@ -2499,7 +2499,7 @@ return bits; } -CARD32 +static CARD32 fbFetcha_transform (FbCompositeOperand *op) { PictVector v; @@ -2583,7 +2583,7 @@ return bits; } -FbAccessMap fbAccessMap[] = { +static const FbAccessMap fbAccessMap[] = { /* 32bpp formats */ { PICT_a8r8g8b8, fbFetch_a8r8g8b8, fbFetch_a8r8g8b8, fbStore_a8r8g8b8 }, { PICT_x8r8g8b8, fbFetch_x8r8g8b8, fbFetch_x8r8g8b8, fbStore_x8r8g8b8 }, @@ -2693,7 +2693,8 @@ op->u.transform.y = y - op->u.transform.top_y; } -Bool + +static Bool fbBuildCompositeOperand (PicturePtr pPict, FbCompositeOperand op[4], INT16 x, @@ -2709,6 +2710,7 @@ op->u.transform.top_y = pPict->pDrawable->y; op->u.transform.left_x = pPict->pDrawable->x; + op->u.transform.start_x = x - op->u.transform.left_x; op->u.transform.x = op->u.transform.start_x; op->u.transform.y = y - op->u.transform.top_y; @@ -2820,21 +2822,6 @@ FbCombineFunc f; int w; -#if 0 - ErrorF ("op: %d\n" - "src format: %lx\n" - "msk format %lx\n" - "dst format %lx\n" - "width: %d\n" - "height %d\n", - op, - pSrc? pSrc->format : 0, - pMask? pMask->format : 0, - pDst? pDst->format : 0, - width, height); - ErrorF ("PICT_x8r8g8b8: %lx\n", PICT_x8r8g8b8); -#endif - if (!fbBuildCompositeOperand (pSrc, src, xSrc, ySrc, TRUE, TRUE)) return; if (!fbBuildCompositeOperand (pDst, dst, xDst, yDst, FALSE, TRUE)) Index: fboverlay.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fboverlay.c,v retrieving revision 1.4 diff -u -d -r1.4 fboverlay.c --- fboverlay.c 30 Jul 2004 20:30:51 -0000 1.4 +++ fboverlay.c 16 Mar 2005 20:45:06 -0000 @@ -31,7 +31,7 @@ int fbOverlayGeneration; int fbOverlayScreenPrivateIndex = -1; -int fbOverlayGetScreenPrivateIndex(void) +FB_EXPORT int fbOverlayGetScreenPrivateIndex(void) { return fbOverlayScreenPrivateIndex; } @@ -330,7 +330,7 @@ return retval; } -Bool +FB_EXPORT Bool fbOverlayFinishScreenInit(ScreenPtr pScreen, pointer pbits1, pointer pbits2, Index: fbpict.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbpict.c,v retrieving revision 1.5 diff -u -d -r1.5 fbpict.c --- fbpict.c 6 Aug 2004 23:42:10 -0000 1.5 +++ fbpict.c 16 Mar 2005 20:45:06 -0000 @@ -1215,7 +1215,7 @@ #endif /* RENDER */ -Bool +FB_EXPORT Bool fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { Index: fbpict.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbpict.h,v retrieving revision 1.8 diff -u -d -r1.8 fbpict.h --- fbpict.h 16 Jan 2005 01:59:23 -0000 1.8 +++ fbpict.h 16 Mar 2005 20:45:06 -0000 @@ -1,7 +1,7 @@ /* * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.7 2001/07/18 10:15:02 keithp Exp $ * - * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -72,7 +72,7 @@ CARD16 width, CARD16 height); -#define fbComposeGetSolid(pict, bits, fmt) { \ +#define fbComposeGetSolid(pict, bits) { \ FbBits *__bits__; \ FbStride __stride__; \ int __bpp__; \ @@ -93,14 +93,6 @@ default: \ return; \ } \ - /* If necessary, convert RGB <--> BGR. */ \ - if (PICT_FORMAT_TYPE((pict)->format) != PICT_FORMAT_TYPE(fmt)) \ - { \ - (bits) = (((bits) & 0xff000000) | \ - (((bits) & 0x00ff0000) >> 16) | \ - (((bits) & 0x0000ff00) >> 0) | \ - (((bits) & 0x000000ff) << 16)); \ - } \ /* manage missing src alpha */ \ if ((pict)->pFormat->direct.alphaMask == 0) \ (bits) |= 0xff000000; \ @@ -207,7 +199,9 @@ /* * search on format */ +#if 0 extern FbAccessMap fbAccessMap[]; +#endif /* fbcompose.c */ @@ -220,6 +214,7 @@ * All compositing operators * */ +#if 0 CARD32 fbCombineMaskU (FbCompositeOperand *src, FbCompositeOperand *msk); @@ -812,6 +807,9 @@ INT16 y, Bool transform, Bool alpha); + +#endif + void fbCompositeGeneral (CARD8 op, PicturePtr pSrc, Index: fbscreen.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbscreen.c,v retrieving revision 1.3 diff -u -d -r1.3 fbscreen.c --- fbscreen.c 16 May 2004 05:08:39 -0000 1.3 +++ fbscreen.c 16 Mar 2005 20:45:06 -0000 @@ -98,7 +98,7 @@ } #endif -Bool +FB_EXPORT Bool fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */ int xsize, /* in pixels */ @@ -255,7 +255,7 @@ } /* dts * (inch/dot) * (25.4 mm / inch) = mm */ -Bool +FB_EXPORT Bool fbScreenInit(ScreenPtr pScreen, pointer pbits, int xsize, Index: fbseg.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbseg.c,v retrieving revision 1.2 diff -u -d -r1.2 fbseg.c --- fbseg.c 23 Apr 2004 19:05:14 -0000 1.2 +++ fbseg.c 16 Mar 2005 20:45:06 -0000 @@ -564,7 +564,7 @@ return bres; } -void +FB_EXPORT void fbBres (DrawablePtr pDrawable, GCPtr pGC, int dashOffset,