This fixes the close screen mess (crash reported by Thomas). Also hide the
private Exa screen definition. Properly cleanup on screen close and do not delete the private screen in the DriverFini call.
This commit is contained in:
parent
4ef813961d
commit
e34f31762e
65
exa/exa.c
65
exa/exa.c
|
@ -165,6 +165,8 @@ exaPixmapAllocArea (PixmapPtr pPixmap)
|
|||
pitch = (w * bpp / 8 + pExaScr->info->card.offscreenPitch - 1) &
|
||||
~(pExaScr->info->card.offscreenPitch - 1);
|
||||
|
||||
ErrorF("allocating pixmap with pitch = %d, bpp = %d, byteAlign = %d\n",
|
||||
pitch, bpp, pExaScr->info->card.offscreenByteAlign);
|
||||
pExaPixmap->devKind = pPixmap->devKind;
|
||||
pExaPixmap->devPrivate = pPixmap->devPrivate;
|
||||
pExaPixmap->area = exaOffscreenAlloc (pScreen, pitch * h,
|
||||
|
@ -344,6 +346,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
ErrorF("Creating a pixmap on %d display, with %d bpp\n", depth, bpp);
|
||||
pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp);
|
||||
if (!pPixmap)
|
||||
return NULL;
|
||||
|
@ -1084,6 +1087,35 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
exaCloseScreen(int i, ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
#ifdef RENDER
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||
#endif
|
||||
|
||||
pScreen->CreateGC = pExaScr->SavedCreateGC;
|
||||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = pExaScr->SavedComposite;
|
||||
}
|
||||
#endif
|
||||
|
||||
xfree (pExaScr);
|
||||
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
exaDriverInit (ScreenPtr pScreen,
|
||||
ExaDriverPtr pScreenInfo)
|
||||
|
@ -1110,19 +1142,35 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
|
||||
pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr;
|
||||
|
||||
/*
|
||||
* Hook up asynchronous drawing
|
||||
*/
|
||||
ExaScreenInitAsync (pScreen);
|
||||
/*
|
||||
* Replace various fb screen functions
|
||||
*/
|
||||
pExaScr->SavedCloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = exaCloseScreen;
|
||||
|
||||
pExaScr->SavedCreateGC = pScreen->CreateGC;
|
||||
pScreen->CreateGC = exaCreateGC;
|
||||
|
||||
pExaScr->SavedGetImage = pScreen->GetImage;
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
|
||||
pExaScr->SavedGetSpans = pScreen->GetSpans;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
|
||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = exaCopyWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
ps->Composite = exaComposite;
|
||||
}
|
||||
#endif
|
||||
|
@ -1136,7 +1184,10 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex,
|
||||
sizeof (ExaPixmapPrivRec)))
|
||||
return FALSE;
|
||||
pExaScr->SavedCreatePixmap = pScreen->CreatePixmap;
|
||||
pScreen->CreatePixmap = exaCreatePixmap;
|
||||
|
||||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||
}
|
||||
else
|
||||
|
@ -1158,13 +1209,9 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
void
|
||||
exaDriverFini (ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
STRACE;
|
||||
xfree (pExaScr);
|
||||
/*right now does nothing*/
|
||||
}
|
||||
|
||||
|
||||
void exaMarkSync(ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
|
|
@ -182,10 +182,6 @@ typedef struct _ExaDriver {
|
|||
ExaAccelInfoRec accel;
|
||||
} ExaDriverRec, *ExaDriverPtr;
|
||||
|
||||
typedef struct {
|
||||
ExaDriverPtr info;
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
||||
#define EXA_OFFSCREEN_PIXMAPS (1 << 0)
|
||||
#define EXA_OFFSCREEN_ALIGN_POT (1 << 1)
|
||||
|
||||
|
|
|
@ -165,6 +165,8 @@ exaPixmapAllocArea (PixmapPtr pPixmap)
|
|||
pitch = (w * bpp / 8 + pExaScr->info->card.offscreenPitch - 1) &
|
||||
~(pExaScr->info->card.offscreenPitch - 1);
|
||||
|
||||
ErrorF("allocating pixmap with pitch = %d, bpp = %d, byteAlign = %d\n",
|
||||
pitch, bpp, pExaScr->info->card.offscreenByteAlign);
|
||||
pExaPixmap->devKind = pPixmap->devKind;
|
||||
pExaPixmap->devPrivate = pPixmap->devPrivate;
|
||||
pExaPixmap->area = exaOffscreenAlloc (pScreen, pitch * h,
|
||||
|
@ -344,6 +346,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
ErrorF("Creating a pixmap on %d display, with %d bpp\n", depth, bpp);
|
||||
pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp);
|
||||
if (!pPixmap)
|
||||
return NULL;
|
||||
|
@ -1084,6 +1087,35 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
exaCloseScreen(int i, ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
#ifdef RENDER
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||
#endif
|
||||
|
||||
pScreen->CreateGC = pExaScr->SavedCreateGC;
|
||||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = pExaScr->SavedComposite;
|
||||
}
|
||||
#endif
|
||||
|
||||
xfree (pExaScr);
|
||||
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
exaDriverInit (ScreenPtr pScreen,
|
||||
ExaDriverPtr pScreenInfo)
|
||||
|
@ -1110,19 +1142,35 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
|
||||
pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr;
|
||||
|
||||
/*
|
||||
* Hook up asynchronous drawing
|
||||
*/
|
||||
ExaScreenInitAsync (pScreen);
|
||||
/*
|
||||
* Replace various fb screen functions
|
||||
*/
|
||||
pExaScr->SavedCloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = exaCloseScreen;
|
||||
|
||||
pExaScr->SavedCreateGC = pScreen->CreateGC;
|
||||
pScreen->CreateGC = exaCreateGC;
|
||||
|
||||
pExaScr->SavedGetImage = pScreen->GetImage;
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
|
||||
pExaScr->SavedGetSpans = pScreen->GetSpans;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
|
||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = exaCopyWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
ps->Composite = exaComposite;
|
||||
}
|
||||
#endif
|
||||
|
@ -1136,7 +1184,10 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex,
|
||||
sizeof (ExaPixmapPrivRec)))
|
||||
return FALSE;
|
||||
pExaScr->SavedCreatePixmap = pScreen->CreatePixmap;
|
||||
pScreen->CreatePixmap = exaCreatePixmap;
|
||||
|
||||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||
}
|
||||
else
|
||||
|
@ -1158,13 +1209,9 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
void
|
||||
exaDriverFini (ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
STRACE;
|
||||
xfree (pExaScr);
|
||||
/*right now does nothing*/
|
||||
}
|
||||
|
||||
|
||||
void exaMarkSync(ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
|
|
@ -165,6 +165,8 @@ exaPixmapAllocArea (PixmapPtr pPixmap)
|
|||
pitch = (w * bpp / 8 + pExaScr->info->card.offscreenPitch - 1) &
|
||||
~(pExaScr->info->card.offscreenPitch - 1);
|
||||
|
||||
ErrorF("allocating pixmap with pitch = %d, bpp = %d, byteAlign = %d\n",
|
||||
pitch, bpp, pExaScr->info->card.offscreenByteAlign);
|
||||
pExaPixmap->devKind = pPixmap->devKind;
|
||||
pExaPixmap->devPrivate = pPixmap->devPrivate;
|
||||
pExaPixmap->area = exaOffscreenAlloc (pScreen, pitch * h,
|
||||
|
@ -344,6 +346,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
ErrorF("Creating a pixmap on %d display, with %d bpp\n", depth, bpp);
|
||||
pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp);
|
||||
if (!pPixmap)
|
||||
return NULL;
|
||||
|
@ -1084,6 +1087,35 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
exaCloseScreen(int i, ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
#ifdef RENDER
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||
#endif
|
||||
|
||||
pScreen->CreateGC = pExaScr->SavedCreateGC;
|
||||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = pExaScr->SavedComposite;
|
||||
}
|
||||
#endif
|
||||
|
||||
xfree (pExaScr);
|
||||
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
exaDriverInit (ScreenPtr pScreen,
|
||||
ExaDriverPtr pScreenInfo)
|
||||
|
@ -1110,19 +1142,35 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
|
||||
pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr;
|
||||
|
||||
/*
|
||||
* Hook up asynchronous drawing
|
||||
*/
|
||||
ExaScreenInitAsync (pScreen);
|
||||
/*
|
||||
* Replace various fb screen functions
|
||||
*/
|
||||
pExaScr->SavedCloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = exaCloseScreen;
|
||||
|
||||
pExaScr->SavedCreateGC = pScreen->CreateGC;
|
||||
pScreen->CreateGC = exaCreateGC;
|
||||
|
||||
pExaScr->SavedGetImage = pScreen->GetImage;
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
|
||||
pExaScr->SavedGetSpans = pScreen->GetSpans;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
|
||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = exaCopyWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
ps->Composite = exaComposite;
|
||||
}
|
||||
#endif
|
||||
|
@ -1136,7 +1184,10 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex,
|
||||
sizeof (ExaPixmapPrivRec)))
|
||||
return FALSE;
|
||||
pExaScr->SavedCreatePixmap = pScreen->CreatePixmap;
|
||||
pScreen->CreatePixmap = exaCreatePixmap;
|
||||
|
||||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||
}
|
||||
else
|
||||
|
@ -1158,13 +1209,9 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
void
|
||||
exaDriverFini (ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
STRACE;
|
||||
xfree (pExaScr);
|
||||
/*right now does nothing*/
|
||||
}
|
||||
|
||||
|
||||
void exaMarkSync(ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
|
|
@ -49,6 +49,21 @@
|
|||
#define EXA_MAX_FB FB_OVERLAY_MAX
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
ExaDriverPtr info;
|
||||
CreateGCProcPtr SavedCreateGC;
|
||||
CloseScreenProcPtr SavedCloseScreen;
|
||||
GetImageProcPtr SavedGetImage;
|
||||
GetSpansProcPtr SavedGetSpans;
|
||||
PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
|
||||
CreatePixmapProcPtr SavedCreatePixmap;
|
||||
DestroyPixmapProcPtr SavedDestroyPixmap;
|
||||
PaintWindowBorderProcPtr SavedPaintWindowBorder;
|
||||
CopyWindowProcPtr SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
CompositeProcPtr SavedComposite;
|
||||
#endif
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
||||
/*
|
||||
* This is the only completely portable way to
|
||||
|
@ -179,27 +194,8 @@ ExaCheckRestoreAreas (PixmapPtr pPixmap,
|
|||
void
|
||||
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
void
|
||||
ExaCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
void
|
||||
ExaCheckPaintKey(DrawablePtr pDrawable,
|
||||
RegionPtr pRegion,
|
||||
CARD32 pixel,
|
||||
int layer);
|
||||
|
||||
void
|
||||
ExaCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
void
|
||||
ExaScreenInitAsync (ScreenPtr pScreen);
|
||||
|
||||
extern const GCOps exaAsyncPixmapGCOps;
|
||||
|
||||
/* exapict.c */
|
||||
void
|
||||
ExaPictureInitAsync (ScreenPtr pScreen);
|
||||
|
||||
#ifdef RENDER
|
||||
void
|
||||
ExaCheckComposite (CARD8 op,
|
||||
|
|
|
@ -249,92 +249,36 @@ ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
fbPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
exaWaitSync (pWin->drawable.pScreen);
|
||||
exaDrawableDirty ((DrawablePtr)pWin);
|
||||
fbCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||
}
|
||||
|
||||
#if EXA_MAX_FB > 1
|
||||
void
|
||||
ExaCheckPaintKey(DrawablePtr pDrawable,
|
||||
RegionPtr pRegion,
|
||||
CARD32 pixel,
|
||||
int layer)
|
||||
{
|
||||
exaWaitSync (pDrawable->pScreen);
|
||||
exaDrawableDirty (pDrawable);
|
||||
fbOverlayPaintKey (pDrawable, pRegion, pixel, layer);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
exaWaitSync (pWin->drawable.pScreen);
|
||||
exaDrawableDirty ((DrawablePtr)pWin);
|
||||
fbOverlayCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ExaScreenInitAsync (ScreenPtr pScreen)
|
||||
{
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
pScreen->PaintWindowBackground = ExaCheckPaintWindow;
|
||||
pScreen->PaintWindowBorder = ExaCheckPaintWindow;
|
||||
pScreen->CopyWindow = ExaCheckCopyWindow;
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
|
||||
#ifdef RENDER
|
||||
ExaPictureInitAsync (pScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExaCheckComposite (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height)
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height)
|
||||
{
|
||||
exaWaitSync (pDst->pDrawable->pScreen);
|
||||
exaDrawableDirty (pDst->pDrawable);
|
||||
fbComposite (op,
|
||||
pSrc,
|
||||
pMask,
|
||||
pDst,
|
||||
xSrc,
|
||||
ySrc,
|
||||
xMask,
|
||||
yMask,
|
||||
xDst,
|
||||
yDst,
|
||||
width,
|
||||
height);
|
||||
pSrc,
|
||||
pMask,
|
||||
pDst,
|
||||
xSrc,
|
||||
ySrc,
|
||||
xMask,
|
||||
yMask,
|
||||
xDst,
|
||||
yDst,
|
||||
width,
|
||||
height);
|
||||
}
|
||||
|
||||
void
|
||||
ExaPictureInitAsync (ScreenPtr pScreen)
|
||||
{
|
||||
PictureScreenPtr ps;
|
||||
|
||||
ps = GetPictureScreen(pScreen);
|
||||
ps->Composite = ExaCheckComposite;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Only need to stall for copyarea/copyplane
|
||||
*/
|
||||
|
|
|
@ -165,6 +165,8 @@ exaPixmapAllocArea (PixmapPtr pPixmap)
|
|||
pitch = (w * bpp / 8 + pExaScr->info->card.offscreenPitch - 1) &
|
||||
~(pExaScr->info->card.offscreenPitch - 1);
|
||||
|
||||
ErrorF("allocating pixmap with pitch = %d, bpp = %d, byteAlign = %d\n",
|
||||
pitch, bpp, pExaScr->info->card.offscreenByteAlign);
|
||||
pExaPixmap->devKind = pPixmap->devKind;
|
||||
pExaPixmap->devPrivate = pPixmap->devPrivate;
|
||||
pExaPixmap->area = exaOffscreenAlloc (pScreen, pitch * h,
|
||||
|
@ -344,6 +346,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
ErrorF("Creating a pixmap on %d display, with %d bpp\n", depth, bpp);
|
||||
pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp);
|
||||
if (!pPixmap)
|
||||
return NULL;
|
||||
|
@ -1084,6 +1087,35 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
exaCloseScreen(int i, ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
#ifdef RENDER
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||
#endif
|
||||
|
||||
pScreen->CreateGC = pExaScr->SavedCreateGC;
|
||||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = pExaScr->SavedComposite;
|
||||
}
|
||||
#endif
|
||||
|
||||
xfree (pExaScr);
|
||||
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
exaDriverInit (ScreenPtr pScreen,
|
||||
ExaDriverPtr pScreenInfo)
|
||||
|
@ -1110,19 +1142,35 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
|
||||
pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr;
|
||||
|
||||
/*
|
||||
* Hook up asynchronous drawing
|
||||
*/
|
||||
ExaScreenInitAsync (pScreen);
|
||||
/*
|
||||
* Replace various fb screen functions
|
||||
*/
|
||||
pExaScr->SavedCloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = exaCloseScreen;
|
||||
|
||||
pExaScr->SavedCreateGC = pScreen->CreateGC;
|
||||
pScreen->CreateGC = exaCreateGC;
|
||||
|
||||
pExaScr->SavedGetImage = pScreen->GetImage;
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
|
||||
pExaScr->SavedGetSpans = pScreen->GetSpans;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
|
||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = exaCopyWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
ps->Composite = exaComposite;
|
||||
}
|
||||
#endif
|
||||
|
@ -1136,7 +1184,10 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex,
|
||||
sizeof (ExaPixmapPrivRec)))
|
||||
return FALSE;
|
||||
pExaScr->SavedCreatePixmap = pScreen->CreatePixmap;
|
||||
pScreen->CreatePixmap = exaCreatePixmap;
|
||||
|
||||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||
}
|
||||
else
|
||||
|
@ -1158,13 +1209,9 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
void
|
||||
exaDriverFini (ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
STRACE;
|
||||
xfree (pExaScr);
|
||||
/*right now does nothing*/
|
||||
}
|
||||
|
||||
|
||||
void exaMarkSync(ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
|
|
@ -182,10 +182,6 @@ typedef struct _ExaDriver {
|
|||
ExaAccelInfoRec accel;
|
||||
} ExaDriverRec, *ExaDriverPtr;
|
||||
|
||||
typedef struct {
|
||||
ExaDriverPtr info;
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
||||
#define EXA_OFFSCREEN_PIXMAPS (1 << 0)
|
||||
#define EXA_OFFSCREEN_ALIGN_POT (1 << 1)
|
||||
|
||||
|
|
|
@ -49,6 +49,21 @@
|
|||
#define EXA_MAX_FB FB_OVERLAY_MAX
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
ExaDriverPtr info;
|
||||
CreateGCProcPtr SavedCreateGC;
|
||||
CloseScreenProcPtr SavedCloseScreen;
|
||||
GetImageProcPtr SavedGetImage;
|
||||
GetSpansProcPtr SavedGetSpans;
|
||||
PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
|
||||
CreatePixmapProcPtr SavedCreatePixmap;
|
||||
DestroyPixmapProcPtr SavedDestroyPixmap;
|
||||
PaintWindowBorderProcPtr SavedPaintWindowBorder;
|
||||
CopyWindowProcPtr SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
CompositeProcPtr SavedComposite;
|
||||
#endif
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
||||
/*
|
||||
* This is the only completely portable way to
|
||||
|
@ -179,27 +194,8 @@ ExaCheckRestoreAreas (PixmapPtr pPixmap,
|
|||
void
|
||||
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
void
|
||||
ExaCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
void
|
||||
ExaCheckPaintKey(DrawablePtr pDrawable,
|
||||
RegionPtr pRegion,
|
||||
CARD32 pixel,
|
||||
int layer);
|
||||
|
||||
void
|
||||
ExaCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
void
|
||||
ExaScreenInitAsync (ScreenPtr pScreen);
|
||||
|
||||
extern const GCOps exaAsyncPixmapGCOps;
|
||||
|
||||
/* exapict.c */
|
||||
void
|
||||
ExaPictureInitAsync (ScreenPtr pScreen);
|
||||
|
||||
#ifdef RENDER
|
||||
void
|
||||
ExaCheckComposite (CARD8 op,
|
||||
|
|
|
@ -165,6 +165,8 @@ exaPixmapAllocArea (PixmapPtr pPixmap)
|
|||
pitch = (w * bpp / 8 + pExaScr->info->card.offscreenPitch - 1) &
|
||||
~(pExaScr->info->card.offscreenPitch - 1);
|
||||
|
||||
ErrorF("allocating pixmap with pitch = %d, bpp = %d, byteAlign = %d\n",
|
||||
pitch, bpp, pExaScr->info->card.offscreenByteAlign);
|
||||
pExaPixmap->devKind = pPixmap->devKind;
|
||||
pExaPixmap->devPrivate = pPixmap->devPrivate;
|
||||
pExaPixmap->area = exaOffscreenAlloc (pScreen, pitch * h,
|
||||
|
@ -344,6 +346,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
ErrorF("Creating a pixmap on %d display, with %d bpp\n", depth, bpp);
|
||||
pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp);
|
||||
if (!pPixmap)
|
||||
return NULL;
|
||||
|
@ -1084,6 +1087,35 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
exaCloseScreen(int i, ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
#ifdef RENDER
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||
#endif
|
||||
|
||||
pScreen->CreateGC = pExaScr->SavedCreateGC;
|
||||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = pExaScr->SavedComposite;
|
||||
}
|
||||
#endif
|
||||
|
||||
xfree (pExaScr);
|
||||
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
exaDriverInit (ScreenPtr pScreen,
|
||||
ExaDriverPtr pScreenInfo)
|
||||
|
@ -1110,19 +1142,35 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
|
||||
pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr;
|
||||
|
||||
/*
|
||||
* Hook up asynchronous drawing
|
||||
*/
|
||||
ExaScreenInitAsync (pScreen);
|
||||
/*
|
||||
* Replace various fb screen functions
|
||||
*/
|
||||
pExaScr->SavedCloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = exaCloseScreen;
|
||||
|
||||
pExaScr->SavedCreateGC = pScreen->CreateGC;
|
||||
pScreen->CreateGC = exaCreateGC;
|
||||
|
||||
pExaScr->SavedGetImage = pScreen->GetImage;
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
|
||||
pExaScr->SavedGetSpans = pScreen->GetSpans;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
|
||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = exaCopyWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
ps->Composite = exaComposite;
|
||||
}
|
||||
#endif
|
||||
|
@ -1136,7 +1184,10 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex,
|
||||
sizeof (ExaPixmapPrivRec)))
|
||||
return FALSE;
|
||||
pExaScr->SavedCreatePixmap = pScreen->CreatePixmap;
|
||||
pScreen->CreatePixmap = exaCreatePixmap;
|
||||
|
||||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||
}
|
||||
else
|
||||
|
@ -1158,13 +1209,9 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
void
|
||||
exaDriverFini (ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
STRACE;
|
||||
xfree (pExaScr);
|
||||
/*right now does nothing*/
|
||||
}
|
||||
|
||||
|
||||
void exaMarkSync(ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
|
|
@ -165,6 +165,8 @@ exaPixmapAllocArea (PixmapPtr pPixmap)
|
|||
pitch = (w * bpp / 8 + pExaScr->info->card.offscreenPitch - 1) &
|
||||
~(pExaScr->info->card.offscreenPitch - 1);
|
||||
|
||||
ErrorF("allocating pixmap with pitch = %d, bpp = %d, byteAlign = %d\n",
|
||||
pitch, bpp, pExaScr->info->card.offscreenByteAlign);
|
||||
pExaPixmap->devKind = pPixmap->devKind;
|
||||
pExaPixmap->devPrivate = pPixmap->devPrivate;
|
||||
pExaPixmap->area = exaOffscreenAlloc (pScreen, pitch * h,
|
||||
|
@ -344,6 +346,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
ErrorF("Creating a pixmap on %d display, with %d bpp\n", depth, bpp);
|
||||
pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp);
|
||||
if (!pPixmap)
|
||||
return NULL;
|
||||
|
@ -1084,6 +1087,35 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
|
||||
static Bool
|
||||
exaCloseScreen(int i, ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
#ifdef RENDER
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||
#endif
|
||||
|
||||
pScreen->CreateGC = pExaScr->SavedCreateGC;
|
||||
pScreen->CloseScreen = pExaScr->SavedCloseScreen;
|
||||
pScreen->GetImage = pExaScr->SavedGetImage;
|
||||
pScreen->GetSpans = pExaScr->SavedGetSpans;
|
||||
pScreen->PaintWindowBackground = pExaScr->SavedPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = pExaScr->SavedPaintWindowBorder;
|
||||
pScreen->CreatePixmap = pExaScr->SavedCreatePixmap;
|
||||
pScreen->DestroyPixmap = pExaScr->SavedDestroyPixmap;
|
||||
pScreen->CopyWindow = pExaScr->SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
ps->Composite = pExaScr->SavedComposite;
|
||||
}
|
||||
#endif
|
||||
|
||||
xfree (pExaScr);
|
||||
|
||||
return (*pScreen->CloseScreen) (i, pScreen);
|
||||
}
|
||||
|
||||
Bool
|
||||
exaDriverInit (ScreenPtr pScreen,
|
||||
ExaDriverPtr pScreenInfo)
|
||||
|
@ -1110,19 +1142,35 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
|
||||
pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr;
|
||||
|
||||
/*
|
||||
* Hook up asynchronous drawing
|
||||
*/
|
||||
ExaScreenInitAsync (pScreen);
|
||||
/*
|
||||
* Replace various fb screen functions
|
||||
*/
|
||||
pExaScr->SavedCloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = exaCloseScreen;
|
||||
|
||||
pExaScr->SavedCreateGC = pScreen->CreateGC;
|
||||
pScreen->CreateGC = exaCreateGC;
|
||||
|
||||
pExaScr->SavedGetImage = pScreen->GetImage;
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
|
||||
pExaScr->SavedGetSpans = pScreen->GetSpans;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
|
||||
pExaScr->SavedCopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = exaCopyWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBackground = pScreen->PaintWindowBackground;
|
||||
pScreen->PaintWindowBackground = exaPaintWindow;
|
||||
|
||||
pExaScr->SavedPaintWindowBorder = pScreen->PaintWindowBorder;
|
||||
pScreen->PaintWindowBorder = exaPaintWindow;
|
||||
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
#ifdef RENDER
|
||||
if (ps) {
|
||||
pExaScr->SavedComposite = ps->Composite;
|
||||
ps->Composite = exaComposite;
|
||||
}
|
||||
#endif
|
||||
|
@ -1136,7 +1184,10 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex,
|
||||
sizeof (ExaPixmapPrivRec)))
|
||||
return FALSE;
|
||||
pExaScr->SavedCreatePixmap = pScreen->CreatePixmap;
|
||||
pScreen->CreatePixmap = exaCreatePixmap;
|
||||
|
||||
pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap;
|
||||
pScreen->DestroyPixmap = exaDestroyPixmap;
|
||||
}
|
||||
else
|
||||
|
@ -1158,13 +1209,9 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
void
|
||||
exaDriverFini (ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
STRACE;
|
||||
xfree (pExaScr);
|
||||
/*right now does nothing*/
|
||||
}
|
||||
|
||||
|
||||
void exaMarkSync(ScreenPtr pScreen)
|
||||
{
|
||||
ExaScreenPriv(pScreen);
|
||||
|
|
|
@ -49,6 +49,21 @@
|
|||
#define EXA_MAX_FB FB_OVERLAY_MAX
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
ExaDriverPtr info;
|
||||
CreateGCProcPtr SavedCreateGC;
|
||||
CloseScreenProcPtr SavedCloseScreen;
|
||||
GetImageProcPtr SavedGetImage;
|
||||
GetSpansProcPtr SavedGetSpans;
|
||||
PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
|
||||
CreatePixmapProcPtr SavedCreatePixmap;
|
||||
DestroyPixmapProcPtr SavedDestroyPixmap;
|
||||
PaintWindowBorderProcPtr SavedPaintWindowBorder;
|
||||
CopyWindowProcPtr SavedCopyWindow;
|
||||
#ifdef RENDER
|
||||
CompositeProcPtr SavedComposite;
|
||||
#endif
|
||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||
|
||||
/*
|
||||
* This is the only completely portable way to
|
||||
|
@ -179,27 +194,8 @@ ExaCheckRestoreAreas (PixmapPtr pPixmap,
|
|||
void
|
||||
ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
|
||||
|
||||
void
|
||||
ExaCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
void
|
||||
ExaCheckPaintKey(DrawablePtr pDrawable,
|
||||
RegionPtr pRegion,
|
||||
CARD32 pixel,
|
||||
int layer);
|
||||
|
||||
void
|
||||
ExaCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
void
|
||||
ExaScreenInitAsync (ScreenPtr pScreen);
|
||||
|
||||
extern const GCOps exaAsyncPixmapGCOps;
|
||||
|
||||
/* exapict.c */
|
||||
void
|
||||
ExaPictureInitAsync (ScreenPtr pScreen);
|
||||
|
||||
#ifdef RENDER
|
||||
void
|
||||
ExaCheckComposite (CARD8 op,
|
||||
|
|
|
@ -249,92 +249,36 @@ ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
fbPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
exaWaitSync (pWin->drawable.pScreen);
|
||||
exaDrawableDirty ((DrawablePtr)pWin);
|
||||
fbCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||
}
|
||||
|
||||
#if EXA_MAX_FB > 1
|
||||
void
|
||||
ExaCheckPaintKey(DrawablePtr pDrawable,
|
||||
RegionPtr pRegion,
|
||||
CARD32 pixel,
|
||||
int layer)
|
||||
{
|
||||
exaWaitSync (pDrawable->pScreen);
|
||||
exaDrawableDirty (pDrawable);
|
||||
fbOverlayPaintKey (pDrawable, pRegion, pixel, layer);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
exaWaitSync (pWin->drawable.pScreen);
|
||||
exaDrawableDirty ((DrawablePtr)pWin);
|
||||
fbOverlayCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ExaScreenInitAsync (ScreenPtr pScreen)
|
||||
{
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
pScreen->PaintWindowBackground = ExaCheckPaintWindow;
|
||||
pScreen->PaintWindowBorder = ExaCheckPaintWindow;
|
||||
pScreen->CopyWindow = ExaCheckCopyWindow;
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
|
||||
#ifdef RENDER
|
||||
ExaPictureInitAsync (pScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExaCheckComposite (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height)
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height)
|
||||
{
|
||||
exaWaitSync (pDst->pDrawable->pScreen);
|
||||
exaDrawableDirty (pDst->pDrawable);
|
||||
fbComposite (op,
|
||||
pSrc,
|
||||
pMask,
|
||||
pDst,
|
||||
xSrc,
|
||||
ySrc,
|
||||
xMask,
|
||||
yMask,
|
||||
xDst,
|
||||
yDst,
|
||||
width,
|
||||
height);
|
||||
pSrc,
|
||||
pMask,
|
||||
pDst,
|
||||
xSrc,
|
||||
ySrc,
|
||||
xMask,
|
||||
yMask,
|
||||
xDst,
|
||||
yDst,
|
||||
width,
|
||||
height);
|
||||
}
|
||||
|
||||
void
|
||||
ExaPictureInitAsync (ScreenPtr pScreen)
|
||||
{
|
||||
PictureScreenPtr ps;
|
||||
|
||||
ps = GetPictureScreen(pScreen);
|
||||
ps->Composite = ExaCheckComposite;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Only need to stall for copyarea/copyplane
|
||||
*/
|
||||
|
|
|
@ -249,92 +249,36 @@ ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what)
|
|||
fbPaintWindow (pWin, pRegion, what);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
exaWaitSync (pWin->drawable.pScreen);
|
||||
exaDrawableDirty ((DrawablePtr)pWin);
|
||||
fbCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||
}
|
||||
|
||||
#if EXA_MAX_FB > 1
|
||||
void
|
||||
ExaCheckPaintKey(DrawablePtr pDrawable,
|
||||
RegionPtr pRegion,
|
||||
CARD32 pixel,
|
||||
int layer)
|
||||
{
|
||||
exaWaitSync (pDrawable->pScreen);
|
||||
exaDrawableDirty (pDrawable);
|
||||
fbOverlayPaintKey (pDrawable, pRegion, pixel, layer);
|
||||
}
|
||||
|
||||
void
|
||||
ExaCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
exaWaitSync (pWin->drawable.pScreen);
|
||||
exaDrawableDirty ((DrawablePtr)pWin);
|
||||
fbOverlayCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ExaScreenInitAsync (ScreenPtr pScreen)
|
||||
{
|
||||
pScreen->GetImage = ExaCheckGetImage;
|
||||
pScreen->GetSpans = ExaCheckGetSpans;
|
||||
pScreen->PaintWindowBackground = ExaCheckPaintWindow;
|
||||
pScreen->PaintWindowBorder = ExaCheckPaintWindow;
|
||||
pScreen->CopyWindow = ExaCheckCopyWindow;
|
||||
pScreen->BackingStoreFuncs.SaveAreas = ExaCheckSaveAreas;
|
||||
pScreen->BackingStoreFuncs.RestoreAreas = ExaCheckRestoreAreas;
|
||||
|
||||
#ifdef RENDER
|
||||
ExaPictureInitAsync (pScreen);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExaCheckComposite (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height)
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height)
|
||||
{
|
||||
exaWaitSync (pDst->pDrawable->pScreen);
|
||||
exaDrawableDirty (pDst->pDrawable);
|
||||
fbComposite (op,
|
||||
pSrc,
|
||||
pMask,
|
||||
pDst,
|
||||
xSrc,
|
||||
ySrc,
|
||||
xMask,
|
||||
yMask,
|
||||
xDst,
|
||||
yDst,
|
||||
width,
|
||||
height);
|
||||
pSrc,
|
||||
pMask,
|
||||
pDst,
|
||||
xSrc,
|
||||
ySrc,
|
||||
xMask,
|
||||
yMask,
|
||||
xDst,
|
||||
yDst,
|
||||
width,
|
||||
height);
|
||||
}
|
||||
|
||||
void
|
||||
ExaPictureInitAsync (ScreenPtr pScreen)
|
||||
{
|
||||
PictureScreenPtr ps;
|
||||
|
||||
ps = GetPictureScreen(pScreen);
|
||||
ps->Composite = ExaCheckComposite;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Only need to stall for copyarea/copyplane
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user