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:
Enrico Weigelt, metux IT consult 2025-04-28 12:34:54 +02:00
parent d04872f8c4
commit 981ee4fcf1
4 changed files with 5 additions and 8 deletions

View File

@ -553,8 +553,7 @@ KdCreateScreenResources(ScreenPtr pScreen)
return ret;
}
static Bool
KdCloseScreen(ScreenPtr pScreen)
Bool KdCloseScreen(ScreenPtr pScreen)
{
KdScreenPriv(pScreen);
KdScreenInfo *screen = pScreenPriv->screen;

View File

@ -434,4 +434,6 @@ void
void
InitCard(char *name);
Bool KdCloseScreen(ScreenPtr pScreen);
#endif /* _KDRIVE_H_ */

View File

@ -142,13 +142,13 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
ScreenPriv->WindowExposures = pScreen->WindowExposures;
ScreenPriv->ClipNotify = pScreen->ClipNotify;
ScreenPriv->CloseScreen = pScreen->CloseScreen;
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
pScreen->DestroyWindow = KdXVDestroyWindow;
pScreen->WindowExposures = KdXVWindowExposures;
pScreen->ClipNotify = KdXVClipNotify;
/* it will call KdCloseScreen() as it's the last act */
pScreen->CloseScreen = KdXVCloseScreen;
if (!KdXVInitAdaptors(pScreen, adaptors, num))
@ -922,9 +922,6 @@ KdXVCloseScreen(ScreenPtr pScreen)
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
pScreen->WindowExposures = ScreenPriv->WindowExposures;
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++) {
KdXVFreeAdaptor(pa);
@ -933,7 +930,7 @@ KdXVCloseScreen(ScreenPtr pScreen)
free(pxvs->pAdaptors);
free(ScreenPriv);
return pScreen->CloseScreen(pScreen);
return KdCloseScreen(pScreen);
}
/**** XvAdaptorRec fields ****/

View File

@ -154,7 +154,6 @@ typedef struct {
DestroyWindowProcPtr DestroyWindow;
ClipNotifyProcPtr ClipNotify;
WindowExposuresProcPtr WindowExposures;
CloseScreenProcPtr CloseScreen;
} KdXVScreenRec, *KdXVScreenPtr;
typedef struct {