From 1bcb842bb700e62cbd08ab2fde1f78f374eda1ab Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 27 Sep 2024 10:47:42 +0200 Subject: [PATCH] (!1705) xwin: drop wrapping on ScreenRec->ModifyPixmapHeader() Instead of complicated wrapping, just call fbModifyPixmapHeader() directly. Signed-off-by: Enrico Weigelt, metux IT consult --- fb/fb.h | 2 ++ hw/xwin/win.h | 1 - hw/xwin/winmultiwindowwindow.c | 11 +---------- hw/xwin/winscrinit.c | 3 --- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/fb/fb.h b/fb/fb.h index e81dd3e89..1778ebc8a 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -846,6 +846,8 @@ fbPolyFillRect(DrawablePtr pDrawable, #define fbMoveWindow miMoveWindow +#define fbModifyPixmapHeader miModifyPixmapHeader + /* * fbfillsp.c */ diff --git a/hw/xwin/win.h b/hw/xwin/win.h index da50bce8c..f33f06e18 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -503,7 +503,6 @@ typedef struct _winPrivScreenRec { PostValidateTreeProcPtr PostValidateTree; ClearToBackgroundProcPtr ClearToBackground; ClipNotifyProcPtr ClipNotify; - ModifyPixmapHeaderProcPtr ModifyPixmapHeader; winCursorRec cursor; diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 23e932f30..b6fda762e 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -1092,7 +1092,6 @@ winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap, { int i; winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap); - Bool fResult; /* reinitialize everything */ pPixmap->drawable.depth = depth; @@ -1143,13 +1142,5 @@ winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap, winDebug("winModifyPixmapHeaderMultiwindow: falling back\n"); - { - ScreenPtr pScreen = pPixmap->drawable.pScreen; - winScreenPriv(pScreen); - WIN_UNWRAP(ModifyPixmapHeader); - fResult = (*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); - WIN_WRAP(ModifyPixmapHeader, winModifyPixmapHeaderMultiwindow); - } - - return fResult; + return fbModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); } diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 86293739f..0fc7b9d9e 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -401,9 +401,6 @@ winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) pScreenPriv->a = NULL; \ } - /* Save a pointer to each lower-level window procedure */ - WRAP(ModifyPixmapHeader); - /* Assign multi-window window procedures to be top level procedures */ pScreen->CreateWindow = winCreateWindowMultiWindow; pScreen->DestroyWindow = winDestroyWindowMultiWindow;