xwin: call winFinishScreenInitFB() directly

Both engines, GDI as well as DirectDraw, using the same screen init finish function,
so no need to keep indirection via per-engine callback pointer.

The winFinishScreenInitFB() can also be made static now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-09-26 19:58:33 +02:00
parent 7cbb183721
commit dce437bb53
4 changed files with 5 additions and 10 deletions

View File

@ -485,7 +485,6 @@ typedef struct _winPrivScreenRec {
winInitVisualsProcPtr pwinInitVisuals; winInitVisualsProcPtr pwinInitVisuals;
winAdjustVideoModeProcPtr pwinAdjustVideoMode; winAdjustVideoModeProcPtr pwinAdjustVideoMode;
winCreateBoundingWindowProcPtr pwinCreateBoundingWindow; winCreateBoundingWindowProcPtr pwinCreateBoundingWindow;
winFinishScreenInitProcPtr pwinFinishScreenInit;
winBltExposedRegionsProcPtr pwinBltExposedRegions; winBltExposedRegionsProcPtr pwinBltExposedRegions;
winBltExposedWindowRegionProcPtr pwinBltExposedWindowRegion; winBltExposedWindowRegionProcPtr pwinBltExposedWindowRegion;
winActivateAppProcPtr pwinActivateApp; winActivateAppProcPtr pwinActivateApp;
@ -827,9 +826,6 @@ void
Bool Bool
winScreenInit(ScreenPtr pScreen, int argc, char **argv); winScreenInit(ScreenPtr pScreen, int argc, char **argv);
Bool
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
/* /*
* winshadddnl.c * winshadddnl.c
*/ */

View File

@ -38,6 +38,8 @@
#include "win.h" #include "win.h"
#include "winmsg.h" #include "winmsg.h"
static Bool winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
/* /*
* Determine what type of screen we are initializing * Determine what type of screen we are initializing
* and call the appropriate procedure to initialize * and call the appropriate procedure to initialize
@ -165,9 +167,8 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
/* Clear the visuals list */ /* Clear the visuals list */
miClearVisualTypes(); miClearVisualTypes();
/* Call the engine dependent screen initialization procedure */ if (!winFinishScreenInitFB(pScreen->myNum, pScreen, argc, argv)) {
if (!((*pScreenPriv->pwinFinishScreenInit) (pScreen->myNum, pScreen, argc, argv))) { ErrorF("%s(): winFinishScreenInitFB () failed\n", __FUNCTION__);
ErrorF("winScreenInit - winFinishScreenInit () failed\n");
/* call the engine dependent screen close procedure to clean up from a failure */ /* call the engine dependent screen close procedure to clean up from a failure */
pScreenPriv->pwinCloseScreen(pScreen); pScreenPriv->pwinCloseScreen(pScreen);
@ -221,7 +222,7 @@ winCreateScreenResources(ScreenPtr pScreen)
} }
/* See Porting Layer Definition - p. 20 */ /* See Porting Layer Definition - p. 20 */
Bool static Bool
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
{ {
winScreenPriv(pScreen); winScreenPriv(pScreen);

View File

@ -1193,7 +1193,6 @@ winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen)
winCreateBoundingWindowFullScreen; winCreateBoundingWindowFullScreen;
else else
pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed; pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowDDNL; pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowDDNL;
pScreenPriv->pwinBltExposedWindowRegion = NULL; pScreenPriv->pwinBltExposedWindowRegion = NULL;
pScreenPriv->pwinActivateApp = winActivateAppShadowDDNL; pScreenPriv->pwinActivateApp = winActivateAppShadowDDNL;

View File

@ -1265,7 +1265,6 @@ winSetEngineFunctionsShadowGDI(ScreenPtr pScreen)
winCreateBoundingWindowFullScreen; winCreateBoundingWindowFullScreen;
else else
pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed; pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowGDI; pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowGDI;
pScreenPriv->pwinBltExposedWindowRegion = winBltExposedWindowRegionShadowGDI; pScreenPriv->pwinBltExposedWindowRegion = winBltExposedWindowRegionShadowGDI;
pScreenPriv->pwinActivateApp = winActivateAppShadowGDI; pScreenPriv->pwinActivateApp = winActivateAppShadowGDI;