From c1c6045ca1b30a5c650e2395c4396e8530c43407 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 5e517f7a0..c0328c2e8 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 1ed71b938..97821c2da 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 eaa807071..dc3d00902 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -1094,7 +1094,6 @@ winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap, { int i; winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap); - Bool fResult; /* reinitialize everything */ pPixmap->drawable.depth = depth; @@ -1145,13 +1144,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;