Xext: xv: drop obsolete support for internal server reset

Not used anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-11-18 14:09:48 +01:00
committed by Enrico Weigelt
parent e8ec547b93
commit ffea1d479a

View File

@@ -118,10 +118,6 @@ static DevPrivateKeyRec XvScreenKeyRec;
Bool noXvExtension = FALSE;
static x_server_generation_t XvExtensionGeneration = 0;
static x_server_generation_t XvScreenGeneration = 0;
static x_server_generation_t XvResourceGeneration = 0;
int XvReqCode;
static int XvEventBase;
int XvErrorBase;
@@ -168,50 +164,37 @@ XvExtensionInit(void)
/* Look to see if any screens were initialized; if not then
init global variables so the extension can function */
if (XvScreenGeneration != serverGeneration) {
if (!CreateResourceTypes()) {
ErrorF("XvExtensionInit: Unable to allocate resource types\n");
return;
}
if (!CreateResourceTypes()) {
ErrorF("XvExtensionInit: Unable to allocate resource types\n");
return;
}
#ifdef XINERAMA
XineramaRegisterConnectionBlockCallback(XineramifyXv);
XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif /* XINERAMA */
XvScreenGeneration = serverGeneration;
extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors,
ProcXvDispatch, ProcXvDispatch,
XvResetProc, StandardMinorOpcode);
if (!extEntry) {
FatalError("XvExtensionInit: AddExtensions failed\n");
}
if (XvExtensionGeneration != serverGeneration) {
XvExtensionGeneration = serverGeneration;
XvReqCode = extEntry->base;
XvEventBase = extEntry->eventBase;
XvErrorBase = extEntry->errorBase;
extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors,
ProcXvDispatch, ProcXvDispatch,
XvResetProc, StandardMinorOpcode);
if (!extEntry) {
FatalError("XvExtensionInit: AddExtensions failed\n");
}
XvReqCode = extEntry->base;
XvEventBase = extEntry->eventBase;
XvErrorBase = extEntry->errorBase;
EventSwapVector[XvEventBase + XvVideoNotify] =
EventSwapVector[XvEventBase + XvVideoNotify] =
(EventSwapPtr) WriteSwappedVideoNotifyEvent;
EventSwapVector[XvEventBase + XvPortNotify] =
EventSwapVector[XvEventBase + XvPortNotify] =
(EventSwapPtr) WriteSwappedPortNotifyEvent;
SetResourceTypeErrorValue(XvRTPort, _XvBadPort);
(void) dixAddAtom(XvName);
}
SetResourceTypeErrorValue(XvRTPort, _XvBadPort);
(void) dixAddAtom(XvName);
}
static Bool
CreateResourceTypes(void)
{
if (XvResourceGeneration == serverGeneration)
return TRUE;
XvResourceGeneration = serverGeneration;
if (!(XvRTPort = CreateNewResourceType(XvdiDestroyPort, "XvRTPort"))) {
ErrorF("CreateResourceTypes: failed to allocate port resource.\n");
return FALSE;
@@ -252,7 +235,6 @@ CreateResourceTypes(void)
}
return TRUE;
}
static void XvWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWin)
@@ -268,16 +250,13 @@ static void XvPixmapDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, PixmapPtr
int
XvScreenInit(ScreenPtr pScreen)
{
if (XvScreenGeneration != serverGeneration) {
if (!CreateResourceTypes()) {
ErrorF("XvScreenInit: Unable to allocate resource types\n");
return BadAlloc;
}
#ifdef XINERAMA
XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif /* XINERAMA */
XvScreenGeneration = serverGeneration;
if (!CreateResourceTypes()) {
ErrorF("XvScreenInit: Unable to allocate resource types\n");
return BadAlloc;
}
#ifdef XINERAMA
XineramaRegisterConnectionBlockCallback(XineramifyXv);
#endif /* XINERAMA */
if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, sizeof(XvScreenRec)))
return BadAlloc;