dix: Remove pScratchPixmap and other associated ABI changes

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2022-12-21 22:14:01 -08:00
parent 6ee937b3be
commit 3cb3024fea
6 changed files with 8 additions and 21 deletions

View File

@ -195,8 +195,8 @@ dix_main(int argc, char *argv[], char *envp[])
for (i = 0; i < screenInfo.numGPUScreens; i++) { for (i = 0; i < screenInfo.numGPUScreens; i++) {
ScreenPtr pScreen = screenInfo.gpuscreens[i]; ScreenPtr pScreen = screenInfo.gpuscreens[i];
if (!CreateScratchPixmapsForScreen(pScreen)) if (!PixmapScreenInit(pScreen))
FatalError("failed to create scratch pixmaps"); FatalError("failed to create screen pixmap properties");
if (pScreen->CreateScreenResources && if (pScreen->CreateScreenResources &&
!(*pScreen->CreateScreenResources) (pScreen)) !(*pScreen->CreateScreenResources) (pScreen))
FatalError("failed to create screen resources"); FatalError("failed to create screen resources");
@ -205,8 +205,8 @@ dix_main(int argc, char *argv[], char *envp[])
for (i = 0; i < screenInfo.numScreens; i++) { for (i = 0; i < screenInfo.numScreens; i++) {
ScreenPtr pScreen = screenInfo.screens[i]; ScreenPtr pScreen = screenInfo.screens[i];
if (!CreateScratchPixmapsForScreen(pScreen)) if (!PixmapScreenInit(pScreen))
FatalError("failed to create scratch pixmaps"); FatalError("failed to create screen pixmap properties");
if (pScreen->CreateScreenResources && if (pScreen->CreateScreenResources &&
!(*pScreen->CreateScreenResources) (pScreen)) !(*pScreen->CreateScreenResources) (pScreen))
FatalError("failed to create screen resources"); FatalError("failed to create screen resources");
@ -305,7 +305,6 @@ dix_main(int argc, char *argv[], char *envp[])
for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) { for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) {
ScreenPtr pScreen = screenInfo.gpuscreens[i]; ScreenPtr pScreen = screenInfo.gpuscreens[i];
FreeScratchPixmapsForScreen(pScreen);
dixFreeScreenSpecificPrivates(pScreen); dixFreeScreenSpecificPrivates(pScreen);
(*pScreen->CloseScreen) (pScreen); (*pScreen->CloseScreen) (pScreen);
dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
@ -314,7 +313,6 @@ dix_main(int argc, char *argv[], char *envp[])
} }
for (i = screenInfo.numScreens - 1; i >= 0; i--) { for (i = screenInfo.numScreens - 1; i >= 0; i--) {
FreeScratchPixmapsForScreen(screenInfo.screens[i]);
FreeGCperDepth(i); FreeGCperDepth(i);
FreeDefaultStipple(i); FreeDefaultStipple(i);
dixFreeScreenSpecificPrivates(screenInfo.screens[i]); dixFreeScreenSpecificPrivates(screenInfo.screens[i]);

View File

@ -80,7 +80,7 @@ FreeScratchPixmapHeader(PixmapPtr pPixmap)
} }
Bool Bool
CreateScratchPixmapsForScreen(ScreenPtr pScreen) PixmapScreenInit(ScreenPtr pScreen)
{ {
unsigned int pixmap_size; unsigned int pixmap_size;
@ -88,16 +88,9 @@ CreateScratchPixmapsForScreen(ScreenPtr pScreen)
pScreen->totalPixmapSize = pScreen->totalPixmapSize =
BitmapBytePad(pixmap_size * 8); BitmapBytePad(pixmap_size * 8);
/* NULL this out as it is no longer used */
pScreen->pScratchPixmap = NULL;
return TRUE; return TRUE;
} }
void
FreeScratchPixmapsForScreen(ScreenPtr pScreen)
{
}
/* callable by ddx */ /* callable by ddx */
PixmapPtr PixmapPtr
AllocatePixmap(ScreenPtr pScreen, int pixDataSize) AllocatePixmap(ScreenPtr pScreen, int pixDataSize)

View File

@ -74,7 +74,7 @@
* mask is 0xFFFF0000. * mask is 0xFFFF0000.
*/ */
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(25, 4) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(26, 0)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 4) #define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 4)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0)

View File

@ -715,7 +715,7 @@ xf86platformAddDevice(const char *driver_name, int index)
dixSetPrivate(&xf86GPUScreens[i]->pScreen->devPrivates, dixSetPrivate(&xf86GPUScreens[i]->pScreen->devPrivates,
xf86ScreenKey, xf86GPUScreens[i]); xf86ScreenKey, xf86GPUScreens[i]);
CreateScratchPixmapsForScreen(xf86GPUScreens[i]->pScreen); PixmapScreenInit(xf86GPUScreens[i]->pScreen);
if (xf86GPUScreens[i]->pScreen->CreateScreenResources && if (xf86GPUScreens[i]->pScreen->CreateScreenResources &&
!(*xf86GPUScreens[i]->pScreen->CreateScreenResources) (xf86GPUScreens[i]->pScreen)) { !(*xf86GPUScreens[i]->pScreen->CreateScreenResources) (xf86GPUScreens[i]->pScreen)) {

View File

@ -103,9 +103,7 @@ extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(ScreenPtr pScreen,
extern _X_EXPORT void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ ); extern _X_EXPORT void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ );
extern _X_EXPORT Bool CreateScratchPixmapsForScreen(ScreenPtr /*pScreen */ ); extern _X_EXPORT Bool PixmapScreenInit(ScreenPtr /*pScreen */ );
extern _X_EXPORT void FreeScratchPixmapsForScreen(ScreenPtr /*pScreen */ );
extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ , extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ ,
int /*pixDataSize */ ); int /*pixDataSize */ );

View File

@ -604,8 +604,6 @@ typedef struct _Screen {
SetScreenPixmapProcPtr SetScreenPixmap; SetScreenPixmapProcPtr SetScreenPixmap;
NameWindowPixmapProcPtr NameWindowPixmap; NameWindowPixmapProcPtr NameWindowPixmap;
PixmapPtr pScratchPixmap; /* scratch pixmap "pool" (unused / NULL in modern servers) */
unsigned int totalPixmapSize; unsigned int totalPixmapSize;
MarkWindowProcPtr MarkWindow; MarkWindowProcPtr MarkWindow;