(!1947) kdrive: directly calling KdCloseScreen() instead of wrapping
No need to wrap CloseScreen proc vector, we can call KdCloseScreen() from KdXVCloseScreen() directly. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
77d04f45a9
commit
c66a2f8a79
|
@ -553,8 +553,7 @@ KdCreateScreenResources(ScreenPtr pScreen)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
Bool KdCloseScreen(ScreenPtr pScreen)
|
||||||
KdCloseScreen(ScreenPtr pScreen)
|
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
KdScreenInfo *screen = pScreenPriv->screen;
|
KdScreenInfo *screen = pScreenPriv->screen;
|
||||||
|
|
|
@ -434,4 +434,6 @@ void
|
||||||
void
|
void
|
||||||
InitCard(char *name);
|
InitCard(char *name);
|
||||||
|
|
||||||
|
Bool KdCloseScreen(ScreenPtr pScreen);
|
||||||
|
|
||||||
#endif /* _KDRIVE_H_ */
|
#endif /* _KDRIVE_H_ */
|
||||||
|
|
|
@ -142,13 +142,13 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
|
||||||
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
||||||
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
||||||
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
||||||
ScreenPriv->CloseScreen = pScreen->CloseScreen;
|
|
||||||
|
|
||||||
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
||||||
|
|
||||||
pScreen->DestroyWindow = KdXVDestroyWindow;
|
pScreen->DestroyWindow = KdXVDestroyWindow;
|
||||||
pScreen->WindowExposures = KdXVWindowExposures;
|
pScreen->WindowExposures = KdXVWindowExposures;
|
||||||
pScreen->ClipNotify = KdXVClipNotify;
|
pScreen->ClipNotify = KdXVClipNotify;
|
||||||
|
/* it will call KdCloseScreen() as it's the last act */
|
||||||
pScreen->CloseScreen = KdXVCloseScreen;
|
pScreen->CloseScreen = KdXVCloseScreen;
|
||||||
|
|
||||||
if (!KdXVInitAdaptors(pScreen, adaptors, num))
|
if (!KdXVInitAdaptors(pScreen, adaptors, num))
|
||||||
|
@ -922,9 +922,6 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
||||||
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
||||||
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
||||||
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
||||||
pScreen->CloseScreen = ScreenPriv->CloseScreen;
|
|
||||||
|
|
||||||
/* fprintf(stderr,"XV: Unwrapping screen funcs\n"); */
|
|
||||||
|
|
||||||
for (c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
|
for (c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
|
||||||
KdXVFreeAdaptor(pa);
|
KdXVFreeAdaptor(pa);
|
||||||
|
@ -933,7 +930,7 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
||||||
free(pxvs->pAdaptors);
|
free(pxvs->pAdaptors);
|
||||||
free(ScreenPriv);
|
free(ScreenPriv);
|
||||||
|
|
||||||
return pScreen->CloseScreen(pScreen);
|
return KdCloseScreen(pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**** XvAdaptorRec fields ****/
|
/**** XvAdaptorRec fields ****/
|
||||||
|
|
|
@ -154,7 +154,6 @@ typedef struct {
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
DestroyWindowProcPtr DestroyWindow;
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
} KdXVScreenRec, *KdXVScreenPtr;
|
} KdXVScreenRec, *KdXVScreenPtr;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue