Revert "mi: Remove unused overlay support"
This reverts commit 9120e58556
.
Whoops, please revert this patch -- overlay is in use in nvidia drivers,
and it's too late in release cycle to remove it.
I feel really sorry that I kept this patch in my tree. I will submit
another one, removing only XAA overlay hooks which are not used at all.
This commit is contained in:
parent
7673451ade
commit
e2918b6739
|
@ -231,6 +231,7 @@ cat > sdksyms.c << EOF
|
|||
#include "miwideline.h"
|
||||
#include "mistruct.h"
|
||||
#include "mifpoly.h"
|
||||
#include "mioverlay.h"
|
||||
|
||||
|
||||
/* randr/Makefile.am */
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "xaawrap.h"
|
||||
#include "gcstruct.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "mioverlay.h"
|
||||
|
||||
#ifdef PANORAMIX
|
||||
#include "panoramiX.h"
|
||||
|
@ -36,6 +37,7 @@ XAACopyWindow8_32(
|
|||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
XAAInfoRecPtr infoRec =
|
||||
GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin->drawable));
|
||||
Bool doUnderlay = miOverlayCopyUnderlay(pScreen);
|
||||
RegionPtr borderClip = &pWin->borderClip;
|
||||
Bool freeReg = FALSE;
|
||||
|
||||
|
@ -54,6 +56,9 @@ XAACopyWindow8_32(
|
|||
|
||||
pwinRoot = pScreen->root;
|
||||
|
||||
if(doUnderlay)
|
||||
freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip);
|
||||
|
||||
RegionNull(&rgnDst);
|
||||
|
||||
dx = ptOldOrg.x - pWin->drawable.x;
|
||||
|
@ -76,7 +81,7 @@ XAACopyWindow8_32(
|
|||
ppt++; pbox++;
|
||||
}
|
||||
|
||||
infoRec->ScratchGC.planemask = 0xff000000;
|
||||
infoRec->ScratchGC.planemask = doUnderlay ? 0x00ffffff : 0xff000000;
|
||||
infoRec->ScratchGC.alu = GXcopy;
|
||||
|
||||
XAADoBitBlt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot,
|
||||
|
@ -88,6 +93,25 @@ XAACopyWindow8_32(
|
|||
RegionDestroy(borderClip);
|
||||
}
|
||||
|
||||
static void
|
||||
XAASetColorKey8_32(
|
||||
ScreenPtr pScreen,
|
||||
int nbox,
|
||||
BoxPtr pbox
|
||||
){
|
||||
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
|
||||
ScrnInfoPtr pScrn = infoRec->pScrn;
|
||||
|
||||
/* I'm counting on writes being clipped away while switched away.
|
||||
If this isn't going to be true then I need to be wrapping instead. */
|
||||
if(!infoRec->pScrn->vtSema) return;
|
||||
|
||||
(*infoRec->FillSolidRects)(pScrn, pScrn->colorKey << 24, GXcopy,
|
||||
0xff000000, nbox, pbox);
|
||||
|
||||
SET_SYNC_FLAG(infoRec);
|
||||
}
|
||||
|
||||
void
|
||||
XAASetupOverlay8_32Planar(ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -96,6 +120,9 @@ XAASetupOverlay8_32Planar(ScreenPtr pScreen)
|
|||
|
||||
pScreen->CopyWindow = XAACopyWindow8_32;
|
||||
|
||||
if(!(infoRec->FillSolidRectsFlags & NO_PLANEMASK))
|
||||
miOverlaySetTransFunction(pScreen, XAASetColorKey8_32);
|
||||
|
||||
infoRec->FullPlanemask = ~0;
|
||||
for(i = 0; i < 32; i++) /* haven't thought about this much */
|
||||
infoRec->FullPlanemasks[i] = ~0;
|
||||
|
|
|
@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libmi.la
|
|||
if XORG
|
||||
sdk_HEADERS = micmap.h miline.h mipointer.h mi.h mibstore.h \
|
||||
migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \
|
||||
mispans.h miwideline.h mistruct.h mifpoly.h
|
||||
mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h
|
||||
endif
|
||||
|
||||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
@ -33,6 +33,8 @@ libmi_la_SOURCES = \
|
|||
migc.h \
|
||||
miglblt.c \
|
||||
miline.h \
|
||||
mioverlay.c \
|
||||
mioverlay.h \
|
||||
mipointer.c \
|
||||
mipointer.h \
|
||||
mipointrst.h \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,32 @@
|
|||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __MIOVERLAY_H
|
||||
#define __MIOVERLAY_H
|
||||
|
||||
typedef void (*miOverlayTransFunc)(ScreenPtr, int, BoxPtr);
|
||||
typedef Bool (*miOverlayInOverlayFunc)(WindowPtr);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
miInitOverlay(
|
||||
ScreenPtr pScreen,
|
||||
miOverlayInOverlayFunc inOverlay,
|
||||
miOverlayTransFunc trans
|
||||
);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
miOverlayGetPrivateClips(
|
||||
WindowPtr pWin,
|
||||
RegionPtr *borderClip,
|
||||
RegionPtr *clipList
|
||||
);
|
||||
|
||||
extern _X_EXPORT Bool miOverlayCollectUnderlayRegions(WindowPtr, RegionPtr*);
|
||||
extern _X_EXPORT void miOverlayComputeCompositeClip(GCPtr, WindowPtr);
|
||||
extern _X_EXPORT Bool miOverlayCopyUnderlay(ScreenPtr);
|
||||
extern _X_EXPORT void miOverlaySetTransFunction(ScreenPtr, miOverlayTransFunc);
|
||||
extern _X_EXPORT void miOverlaySetRootClip(ScreenPtr, Bool);
|
||||
|
||||
#endif /* __MIOVERLAY_H */
|
Loading…
Reference in New Issue