From 88ece3c37c4ed529686b6cdea1bf9b6eed8fceea Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 20 Mar 2006 19:12:50 +0000 Subject: Bug #5587: Refactor mga_storm.c to only build once for all color depths. (Ian Romanick) --- src/mga_dri.c | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'src/mga_dri.c') diff --git a/src/mga_dri.c b/src/mga_dri.c index 8780160..c235321 100644 --- a/src/mga_dri.c +++ b/src/mga_dri.c @@ -80,25 +80,9 @@ static char MGAClientDriverName[] = "mga"; /* DRI buffer management */ -extern void Mga8DRIInitBuffers( WindowPtr pWin, RegionPtr prgn, - CARD32 index ); -extern void Mga8DRIMoveBuffers( WindowPtr pParent, DDXPointRec ptOldOrg, - RegionPtr prgnSrc, CARD32 index ); - -extern void Mga16DRIInitBuffers( WindowPtr pWin, RegionPtr prgn, - CARD32 index ); -extern void Mga16DRIMoveBuffers( WindowPtr pParent, DDXPointRec ptOldOrg, - RegionPtr prgnSrc, CARD32 index ); - -extern void Mga24DRIInitBuffers( WindowPtr pWin, RegionPtr prgn, - CARD32 index ); -extern void Mga24DRIMoveBuffers( WindowPtr pParent, DDXPointRec ptOldOrg, - RegionPtr prgnSrc, CARD32 index ); - -extern void Mga32DRIInitBuffers( WindowPtr pWin, RegionPtr prgn, - CARD32 index ); -extern void Mga32DRIMoveBuffers( WindowPtr pParent, DDXPointRec ptOldOrg, - RegionPtr prgnSrc, CARD32 index ); +extern void mgaDRIInitBuffers( WindowPtr pWin, RegionPtr prgn, CARD32 index ); +extern void mgaDRIMoveBuffers( WindowPtr pParent, DDXPointRec ptOldOrg, + RegionPtr prgnSrc, CARD32 index ); /* Initialize the visual configs that are supported by the hardware. @@ -1112,20 +1096,8 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) pDRIInfo->SwapContext = MGADRISwapContext; } - switch( pScrn->bitsPerPixel ) { - case 8: - pDRIInfo->InitBuffers = Mga8DRIInitBuffers; - pDRIInfo->MoveBuffers = Mga8DRIMoveBuffers; - case 16: - pDRIInfo->InitBuffers = Mga16DRIInitBuffers; - pDRIInfo->MoveBuffers = Mga16DRIMoveBuffers; - case 24: - pDRIInfo->InitBuffers = Mga24DRIInitBuffers; - pDRIInfo->MoveBuffers = Mga24DRIMoveBuffers; - case 32: - pDRIInfo->InitBuffers = Mga32DRIInitBuffers; - pDRIInfo->MoveBuffers = Mga32DRIMoveBuffers; - } + pDRIInfo->InitBuffers = mgaDRIInitBuffers; + pDRIInfo->MoveBuffers = mgaDRIMoveBuffers; pDRIInfo->bufferRequests = DRI_ALL_WINDOWS; -- cgit v1.2.3