From 9c5c5305fdef7d611ba5abd10cb5fafc7d787f1b Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 29 Apr 2025 11:43:37 +0200 Subject: [PATCH] treewide: drop COMPOSITE symbol It's always enabled for very long time now (at least since meson transition), there doesn't seem to be any need to ever disable it again. So we can reduce code complexity by removing all the ifdef's. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/panoramiX.c | 7 ------- Xext/xres.c | 3 --- dix/colormap.c | 5 ----- dix/dispatch.c | 2 -- dix/window.c | 16 ---------------- exa/exa.c | 2 -- exa/exa_accel.c | 2 -- fb/fb.h | 5 ----- fb/fbpixmap.c | 2 -- fb/fbwindow.c | 2 -- glamor/glamor_copy.c | 2 -- glamor/glamor_pixmap.c | 2 -- glx/glxdricommon.c | 4 ---- glx/glxscreens.c | 11 ----------- glx/glxscreens.h | 2 -- hw/vfb/InitOutput.c | 2 -- hw/xfree86/dri2/dri2.c | 4 ---- hw/xfree86/drivers/modesetting/dri2.c | 2 -- hw/xfree86/sdksyms.sh | 2 -- hw/xnest/Args.c | 2 -- hw/xquartz/mach-startup/bundle-main.c | 5 ----- hw/xwayland/xwayland-present.c | 2 -- hw/xwayland/xwayland-window-buffers.c | 2 -- hw/xwayland/xwayland-window.c | 2 -- hw/xwin/winmultiwindowwindow.c | 2 -- hw/xwin/winshadgdi.c | 2 -- include/extinit.h | 2 -- include/meson.build | 1 - include/pixmapstr.h | 2 -- include/windowstr.h | 2 -- include/xorg-server.h.meson.in | 3 --- mi/miexpose.c | 9 --------- mi/miinitext.c | 6 +----- mi/mivaltree.c | 10 ---------- mi/miwindow.c | 8 +------- miext/damage/damage.c | 8 -------- present/present_scmd.c | 2 -- 37 files changed, 2 insertions(+), 145 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 75f9e37b2..738e006b0 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -52,9 +52,7 @@ Equipment Corporation. #include "picturestr_priv.h" #include "xfixesint.h" #include "damageextint.h" -#ifdef COMPOSITE #include "compint.h" -#endif #include "extinit_priv.h" #include "protocol-versions.h" @@ -584,10 +582,7 @@ PanoramiXExtensionInit(void) PanoramiXRenderInit(); PanoramiXFixesInit(); PanoramiXDamageInit(); -#ifdef COMPOSITE PanoramiXCompositeInit(); -#endif - } Bool @@ -889,9 +884,7 @@ PanoramiXResetProc(ExtensionEntry * extEntry) PanoramiXRenderReset(); PanoramiXFixesReset(); PanoramiXDamageReset(); -#ifdef COMPOSITE PanoramiXCompositeReset (); -#endif screenInfo.numScreens = PanoramiXNumScreens; for (i = 256; i--;) ProcVector[i] = SavedProcVector[i]; diff --git a/Xext/xres.c b/Xext/xres.c index 90f8bc285..846f6feba 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -29,10 +29,7 @@ #include #include "hashtable.h" #include "picturestr.h" - -#ifdef COMPOSITE #include "compint.h" -#endif Bool noResExtension = FALSE; diff --git a/dix/colormap.c b/dix/colormap.c index 9a8be28e2..dbb17b389 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -184,13 +184,8 @@ static void FindColorInRootCmap(ColormapPtr /* pmap */ , #define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1) #define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1) #define NUMBLUE(vis) ((vis->blueMask >> vis->offsetBlue) + 1) -#if COMPOSITE #define ALPHAMASK(vis) ((vis)->nplanes < 32 ? 0 : \ (CARD32) ~((vis)->redMask|(vis)->greenMask|(vis)->blueMask)) -#else -#define ALPHAMASK(vis) 0 -#endif - #define RGBMASK(vis) (vis->redMask | vis->greenMask | vis->blueMask | ALPHAMASK(vis)) /* GetNextBitsOrBreak(bits, mask, base) -- diff --git a/dix/dispatch.c b/dix/dispatch.c index b3e5feacc..46112ff22 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -2197,10 +2197,8 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) (pWin); pBoundingDraw = &pPix->drawable; -#if defined(COMPOSITE) || defined(ROOTLESS) relx -= pPix->screen_x; rely -= pPix->screen_y; -#endif } else { pBoundingDraw = (DrawablePtr) pDraw->pScreen->root; diff --git a/dix/window.c b/dix/window.c index 672593512..e8fd37951 100644 --- a/dix/window.c +++ b/dix/window.c @@ -130,9 +130,7 @@ Equipment Corporation. #endif /* XINERAMA */ #include "dixevents.h" #include "globals.h" -#ifdef COMPOSITE #include "compint.h" -#endif #include "selection.h" #include "inpututils.h" #include "privates.h" @@ -187,9 +185,7 @@ static Bool TileScreenSaver(ScreenPtr pScreen, int kind); #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent)) -#ifdef COMPOSITE static const char *overlay_win_name = ""; -#endif static const char * get_window_name(WindowPtr pWin) @@ -199,12 +195,10 @@ get_window_name(WindowPtr pWin) static char buf[WINDOW_NAME_BUF_LEN]; int len; -#ifdef COMPOSITE CompScreenPtr comp_screen = GetCompScreen(pWin->drawable.pScreen); if (comp_screen && pWin == comp_screen->pOverlayWin) return overlay_win_name; -#endif for (prop = wUserProps(pWin); prop; prop = prop->next) { if (prop->propertyName == XA_WM_NAME && prop->type == XA_STRING && @@ -240,13 +234,11 @@ log_window_info(WindowPtr pWin, int depth) if (pWin->overrideRedirect) ErrorF(" (override redirect)"); -#ifdef COMPOSITE if (pWin->redirectDraw) ErrorF(" (%s compositing: pixmap %x)", (pWin->redirectDraw == RedirectDrawAutomatic) ? "automatic" : "manual", (unsigned) pWin->drawable.pScreen->GetWindowPixmap(pWin)->drawable.id); -#endif switch (pWin->visibility) { case VisibilityUnobscured: @@ -507,9 +499,7 @@ SetWindowToDefaults(WindowPtr pWin) pWin->forcedBG = FALSE; pWin->unhittable = FALSE; -#ifdef COMPOSITE pWin->damagedDescendants = FALSE; -#endif } static void @@ -652,10 +642,8 @@ CreateRootWindow(ScreenPtr pScreen) pScreen->backingStoreSupport = NotUseful; if (enableBackingStore) pScreen->backingStoreSupport = WhenMapped; -#ifdef COMPOSITE if (noCompositeExtension) pScreen->backingStoreSupport = NotUseful; -#endif pScreen->saveUnderSupport = NotUseful; @@ -1717,7 +1705,6 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) void SetWinSize(WindowPtr pWin) { -#ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) { BoxRec box; @@ -1732,7 +1719,6 @@ SetWinSize(WindowPtr pWin) RegionReset(&pWin->winSize, &box); } else -#endif ClippedRegionFromBox(pWin->parent, &pWin->winSize, pWin->drawable.x, pWin->drawable.y, (int) pWin->drawable.width, @@ -1755,7 +1741,6 @@ SetBorderSize(WindowPtr pWin) if (HasBorder(pWin)) { bw = wBorderWidth(pWin); -#ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) { BoxRec box; @@ -1770,7 +1755,6 @@ SetBorderSize(WindowPtr pWin) RegionReset(&pWin->borderSize, &box); } else -#endif ClippedRegionFromBox(pWin->parent, &pWin->borderSize, pWin->drawable.x - bw, pWin->drawable.y - bw, (int) (pWin->drawable.width + (bw << 1)), diff --git a/exa/exa.c b/exa/exa.c index 0422c615f..4c94a9476 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -123,13 +123,11 @@ exaGetDrawablePixmap(DrawablePtr pDrawable) void exaGetDrawableDeltas(DrawablePtr pDrawable, PixmapPtr pPixmap, int *xp, int *yp) { -#if defined(COMPOSITE) || defined(ROOTLESS) if (pDrawable->type == DRAWABLE_WINDOW) { *xp = -pPixmap->screen_x; *yp = -pPixmap->screen_y; return; } -#endif *xp = 0; *yp = 0; diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 92211964f..efe13db8e 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -961,10 +961,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RegionInit(&rgnDst, NullBox, 0); RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); -#if defined(COMPOSITE) || defined(ROOTLESS) if (pPixmap->screen_x || pPixmap->screen_y) RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); -#endif if (pExaScr->fallback_counter) { pExaScr->fallback_flags |= EXA_FALLBACK_COPYWINDOW; diff --git a/fb/fb.h b/fb/fb.h index 717fea8af..c847f19d4 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -441,13 +441,8 @@ typedef struct { #define __fbPixDrawableX(pPix) ((pPix)->drawable.x) #define __fbPixDrawableY(pPix) ((pPix)->drawable.y) -#if defined(COMPOSITE) || defined(ROOTLESS) #define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x) #define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y) -#else -#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix)) -#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix)) -#endif #define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix)) #define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix)) diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c index 3ed2b5680..3fbbf6d68 100644 --- a/fb/fbpixmap.c +++ b/fb/fbpixmap.c @@ -74,10 +74,8 @@ fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, fbInitializeDrawable(&pPixmap->drawable); #endif -#if defined(COMPOSITE) || defined(ROOTLESS) pPixmap->screen_x = 0; pPixmap->screen_y = 0; -#endif pPixmap->usage_hint = usage_hint; diff --git a/fb/fbwindow.c b/fb/fbwindow.c index 96e749a20..435d49dd7 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -114,10 +114,8 @@ fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); -#if defined(COMPOSITE) || defined(ROOTLESS) if (pPixmap->screen_x || pPixmap->screen_y) RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); -#endif miCopyRegion(pDrawable, pDrawable, 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); diff --git a/glamor/glamor_copy.c b/glamor/glamor_copy.c index 909565368..803f4eb91 100644 --- a/glamor/glamor_copy.c +++ b/glamor/glamor_copy.c @@ -781,10 +781,8 @@ glamor_copy_window(WindowPtr window, DDXPointRec old_origin, RegionPtr src_regio RegionIntersect(&dst_region, &window->borderClip, src_region); -#if defined(COMPOSITE) || defined(ROOTLESS) if (pixmap->screen_x || pixmap->screen_y) RegionTranslate(&dst_region, -pixmap->screen_x, -pixmap->screen_y); -#endif miCopyRegion(drawable, drawable, 0, &dst_region, dx, dy, glamor_copy, 0, 0); diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c index c573e7982..625849858 100644 --- a/glamor/glamor_pixmap.c +++ b/glamor/glamor_pixmap.c @@ -39,13 +39,11 @@ void glamor_get_drawable_deltas(DrawablePtr drawable, PixmapPtr pixmap, int *x, int *y) { -#if defined(COMPOSITE) || defined(ROOTLESS) if (drawable->type == DRAWABLE_WINDOW) { *x = -pixmap->screen_x; *y = -pixmap->screen_y; return; } -#endif *x = 0; *y = 0; diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c index 0d83fa714..05602615d 100644 --- a/glx/glxdricommon.c +++ b/glx/glxdricommon.c @@ -202,7 +202,6 @@ createModeFromConfig(const __DRIcoreExtension * core, config->config.drawableType = drawableType; config->config.yInverted = GL_TRUE; -#ifdef COMPOSITE if (!noCompositeExtension) { /* * Here we decide what fbconfigs will be duplicated for compositing. @@ -227,7 +226,6 @@ createModeFromConfig(const __DRIcoreExtension * core, config->config.duplicatedForComp = duplicateForComp; } -#endif return &config->config; } @@ -259,7 +257,6 @@ glxConvertConfigs(const __DRIcoreExtension * core, tail = tail->next; } -#ifdef COMPOSITE if (!noCompositeExtension) { /* Duplicate fbconfigs for use with compositing visuals */ for (i = 0; configs[i]; i++) { @@ -271,7 +268,6 @@ glxConvertConfigs(const __DRIcoreExtension * core, tail = tail->next; } } -#endif return head.next; } diff --git a/glx/glxscreens.c b/glx/glxscreens.c index ef969fcd6..085ee1837 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -42,10 +42,7 @@ #include "glxutil.h" #include "glxext.h" #include "protocol-versions.h" - -#ifdef COMPOSITE #include "compositeext.h" -#endif static DevPrivateKeyRec glxScreenPrivateKeyRec; @@ -278,14 +275,12 @@ pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual) /* Can't use the same FBconfig for multiple X visuals. I think. */ if (config->visualID != 0) continue; -#ifdef COMPOSITE if (!noCompositeExtension) { /* Use only duplicated configs for compIsAlternateVisuals */ if (!!compIsAlternateVisual(pGlxScreen->pScreen, visual->vid) != !!config->duplicatedForComp) continue; } -#endif /* * If possible, use the same swapmethod for all built-in visual * fbconfigs, to avoid getting the 32-bit composite visual when @@ -353,12 +348,10 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen) if (config) { pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; config->visualID = visual->vid; -#ifdef COMPOSITE if (!noCompositeExtension) { if (compIsAlternateVisual(pScreen, visual->vid)) config->visualSelectGroup++; } -#endif } } @@ -378,14 +371,12 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen) * set up above is for. */ depth = config->redBits + config->greenBits + config->blueBits; -#ifdef COMPOSITE if (!noCompositeExtension) { if (config->duplicatedForComp) { depth += config->alphaBits; config->visualSelectGroup++; } } -#endif /* Make sure that our FBconfig's depth can actually be displayed * (corresponds to an existing visual). */ @@ -408,12 +399,10 @@ __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen) if (visual == NULL) continue; -#ifdef COMPOSITE if (!noCompositeExtension) { if (config->duplicatedForComp) (void) CompositeRegisterAlternateVisuals(pScreen, &visual->vid, 1); } -#endif pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; initGlxVisual(visual, config); } diff --git a/glx/glxscreens.h b/glx/glxscreens.h index 40649f88d..1b8b4e979 100644 --- a/glx/glxscreens.h +++ b/glx/glxscreens.h @@ -42,9 +42,7 @@ typedef struct __GLXconfig __GLXconfig; struct __GLXconfig { /* Management */ __GLXconfig *next; -#ifdef COMPOSITE GLboolean duplicatedForComp; -#endif GLuint doubleBufferMode; GLuint stereoMode; diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 94a227b40..e60f5779c 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -395,9 +395,7 @@ ddxProcessArgument(int argc, char *argv[], int i) if (strcmp(argv[i], "-render") == 0) { /* -render */ Render = FALSE; -#ifdef COMPOSITE noCompositeExtension = TRUE; -#endif return 1; } diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 4ac0e144e..6331f1187 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -880,10 +880,8 @@ DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) return NULL; pPriv->prime_secondary_pixmap = spix; -#ifdef COMPOSITE spix->screen_x = mpix->screen_x; spix->screen_y = mpix->screen_y; -#endif DRI2InvalidateDrawableAll(pDraw); return &spix->drawable; @@ -971,9 +969,7 @@ DRI2CanFlip(DrawablePtr pDraw) /* Does the window match the pixmap exactly? */ if (pDraw->x != 0 || pDraw->y != 0 || -#ifdef COMPOSITE pDraw->x != pWinPixmap->screen_x || pDraw->y != pWinPixmap->screen_y || -#endif pDraw->width != pWinPixmap->drawable.width || pDraw->height != pWinPixmap->drawable.height) return FALSE; diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c index 68765cad8..d6656bfd0 100644 --- a/hw/xfree86/drivers/modesetting/dri2.c +++ b/hw/xfree86/drivers/modesetting/dri2.c @@ -288,11 +288,9 @@ ms_dri2_copy_region2(ScreenPtr screen, DrawablePtr drawable, RegionPtr pRegion, } if (translate && drawable->type == DRAWABLE_WINDOW) { -#ifdef COMPOSITE PixmapPtr pixmap = get_drawable_pixmap(drawable); off_x = -pixmap->screen_x; off_y = -pixmap->screen_y; -#endif off_x += drawable->x; off_y += drawable->y; } diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh index 43c45698b..3896f42eb 100755 --- a/hw/xfree86/sdksyms.sh +++ b/hw/xfree86/sdksyms.sh @@ -212,9 +212,7 @@ cat > sdksyms.c << EOF #include "exa.h" */ -#ifdef COMPOSITE #include "compositeext.h" -#endif /* xfixes/Makefile.am */ #include "xfixes.h" diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c index dbaf3a7e5..7fb346906 100644 --- a/hw/xnest/Args.c +++ b/hw/xnest/Args.c @@ -60,9 +60,7 @@ ddxProcessArgument(int argc, char *argv[], int i) noMITShmExtension = TRUE; #endif -#ifdef COMPOSITE noCompositeExtension = TRUE; -#endif #ifdef DPMSExtension noDPMSExtension = TRUE; diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c index f8598534f..acdd8c243 100644 --- a/hw/xquartz/mach-startup/bundle-main.c +++ b/hw/xquartz/mach-startup/bundle-main.c @@ -72,10 +72,7 @@ extern void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2) _X_NORETURN; extern int noPanoramiXExtension; - -#ifdef COMPOSITE extern Bool noCompositeExtension; -#endif #define DEFAULT_CLIENT X11BINDIR "/xterm" #define DEFAULT_STARTX X11BINDIR "/startx -- " X11BINDIR "/Xquartz" @@ -640,10 +637,8 @@ main(int argc, char **argv, char **envp) /* The server must not run the PanoramiX operations. */ noPanoramiXExtension = TRUE; -#ifdef COMPOSITE /* https://gitlab.freedesktop.org/xorg/xserver/-/issues/1409 */ noCompositeExtension = TRUE; -#endif /* Setup the initial crasherporter info */ strlcpy(__crashreporter_info_buff__, __crashreporter_info__base, diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index 07d58ee6a..2a4304cb5 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -1111,10 +1111,8 @@ retry: PixmapPtr old_pixmap = screen->GetWindowPixmap(window); /* Replace window pixmap with flip pixmap */ -#ifdef COMPOSITE vblank->pixmap->screen_x = old_pixmap->screen_x; vblank->pixmap->screen_y = old_pixmap->screen_y; -#endif present_set_tree_pixmap(toplvl_window, old_pixmap, vblank->pixmap); if (toplvl_window == screen->root && diff --git a/hw/xwayland/xwayland-window-buffers.c b/hw/xwayland/xwayland-window-buffers.c index 09265078c..a7a5e67a7 100644 --- a/hw/xwayland/xwayland-window-buffers.c +++ b/hw/xwayland/xwayland-window-buffers.c @@ -308,10 +308,8 @@ xwl_window_set_pixmap(WindowPtr window, PixmapPtr pixmap) visit.old = screen->GetWindowPixmap(window); visit.new = pixmap; -#ifdef COMPOSITE pixmap->screen_x = visit.old->screen_x; pixmap->screen_y = visit.old->screen_y; -#endif TraverseTree(window, xwl_set_pixmap_visit_window, &visit); diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index a77f4fb88..96f871186 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -257,10 +257,8 @@ xwl_source_validate(DrawablePtr drawable, int x, int y, int width, int height, if (!RegionNotEmpty(xwl_window->surface_window_damage)) need_source_validate_dec(xwl_window->xwl_screen); -#if defined(COMPOSITE) if (dst_pix->screen_x || dst_pix->screen_y) RegionTranslate(®ion, -dst_pix->screen_x, -dst_pix->screen_y); -#endif pbox = RegionRects(®ion); nbox = RegionNumRects(®ion); diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 24e226c51..b0e2b1982 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -1071,10 +1071,8 @@ winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth, pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = NULL; // later set to pbBits pPixmap->primary_pixmap = NULL; -#ifdef COMPOSITE pPixmap->screen_x = 0; pPixmap->screen_y = 0; -#endif pPixmap->usage_hint = usage_hint; /* Check for zero width or height pixmaps */ diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c index f8317ad27..d64f1db4f 100644 --- a/hw/xwin/winshadgdi.c +++ b/hw/xwin/winshadgdi.c @@ -828,7 +828,6 @@ winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin) return 0; } -#ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) { HBITMAP hBitmap; HDC hdcPixmap; @@ -870,7 +869,6 @@ winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin) DeleteDC(hdcPixmap); } else -#endif { /* Try to copy from the shadow buffer to the invalidated region */ if (!BitBlt(hdcUpdate, diff --git a/include/extinit.h b/include/extinit.h index 937f71e0e..2b7c05954 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -53,9 +53,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "extnsionst.h" -#ifdef COMPOSITE extern _X_EXPORT Bool noCompositeExtension; -#endif #ifdef XINERAMA extern _X_EXPORT Bool noPanoramiXExtension; diff --git a/include/meson.build b/include/meson.build index 994b4cfba..7248cdfae 100644 --- a/include/meson.build +++ b/include/meson.build @@ -206,7 +206,6 @@ conf_data.set('TCPCONN', '1') conf_data.set('UNIXCONN', host_machine.system() != 'windows' ? '1' : false) conf_data.set('IPv6', build_ipv6 ? '1' : false) -conf_data.set('COMPOSITE', '1') conf_data.set('DAMAGE', '1') conf_data.set('DBE', '1') conf_data.set('DGA', build_dga ? '1' : false) diff --git a/include/pixmapstr.h b/include/pixmapstr.h index 54fc26508..849f09573 100644 --- a/include/pixmapstr.h +++ b/include/pixmapstr.h @@ -78,10 +78,8 @@ typedef struct _Pixmap { int refcnt; int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */ DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */ -#if defined(COMPOSITE) || defined(ROOTLESS) short screen_x; short screen_y; -#endif unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */ PixmapPtr primary_pixmap; /* pointer to primary copy of pixmap for pixmap sharing */ diff --git a/include/windowstr.h b/include/windowstr.h index c7e27965e..ce1f007c7 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -161,10 +161,8 @@ typedef struct _Window { unsigned redirectDraw:2; /* COMPOSITE rendering redirect */ unsigned forcedBG:1; /* must have an opaque background */ unsigned unhittable:1; /* doesn't hit-test, for rootless */ -#ifdef COMPOSITE unsigned damagedDescendants:1; /* some descendants are damaged */ unsigned inhibitBGPaint:1; /* paint the background? */ -#endif } WindowRec; /* diff --git a/include/xorg-server.h.meson.in b/include/xorg-server.h.meson.in index d0572c9d4..31180a5cb 100644 --- a/include/xorg-server.h.meson.in +++ b/include/xorg-server.h.meson.in @@ -23,9 +23,6 @@ /* Default font path */ #mesondefine COMPILEDDEFAULTFONTPATH -/* Support Composite Extension */ -#mesondefine COMPOSITE - /* Build DPMS extension */ #mesondefine DPMSExtension diff --git a/mi/miexpose.c b/mi/miexpose.c index 4af84310c..d5deb1a2e 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -429,10 +429,8 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) tile_x_off = pWin->drawable.x - draw_x_off; tile_y_off = pWin->drawable.y - draw_y_off; fill = pWin->background; -#ifdef COMPOSITE if (pWin->inhibitBGPaint) return; -#endif switch (pWin->backgroundState) { case None: return; @@ -459,15 +457,10 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) tile_x_off = pWin->drawable.x; tile_y_off = pWin->drawable.y; -#if defined(COMPOSITE) || defined(ROOTLESS) draw_x_off = pixmap->screen_x; draw_y_off = pixmap->screen_y; tile_x_off -= draw_x_off; tile_y_off -= draw_y_off; -#else - draw_x_off = 0; - draw_y_off = 0; -#endif } gcval[0].val = GXcopy; @@ -486,7 +479,6 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) gcval[1].val = fill.pixel | RootlessAlphaMask(pWin->drawable.bitsPerPixel); #else -#ifdef COMPOSITE /* Make sure alpha will sample as 1.0 for opaque windows */ if (drawable->depth == 32) { WindowPtr orig_pWin = pWin; @@ -507,7 +499,6 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) if (effective_depth == 24) fill.pixel |= 0xff000000; } -#endif gcval[1].val = fill.pixel; #endif gcval[2].val = FillSolid; diff --git a/mi/miinitext.c b/mi/miinitext.c index 1864e28c5..4467c6212 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -79,10 +79,6 @@ SOFTWARE. #endif /* some DDXes must explicitly prohibit some extensions */ -#ifdef DISABLE_EXT_COMPOSITE -#undef COMPOSITE -#endif - #ifdef DISABLE_EXT_DPMS #undef DPMSExtension #endif @@ -130,7 +126,7 @@ static const ExtensionModule staticExtensions[] = { #ifdef RANDR {RRExtensionInit, "RANDR", &noRRExtension}, #endif -#ifdef COMPOSITE +#ifndef DISABLE_EXT_COMPOSITE {CompositeExtensionInit, "COMPOSITE", &noCompositeExtension}, #endif #ifdef DAMAGE diff --git a/mi/mivaltree.c b/mi/mivaltree.c index edab5dc1b..5d59d0f41 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -100,9 +100,7 @@ Equipment Corporation. #include "regionstr.h" #include "mivalidate.h" #include "globals.h" -#ifdef COMPOSITE #include "compint.h" -#endif /* * Compute the visibility of a shaped window @@ -167,11 +165,7 @@ miShapedWindowIn(RegionPtr universe, RegionPtr bounding, * siblings or parent windows */ -#ifdef COMPOSITE #define TreatAsTransparent(w) ((w)->redirectDraw == RedirectDrawManual) -#else -#define TreatAsTransparent(w) FALSE -#endif #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ @@ -228,7 +222,6 @@ miComputeClips(WindowPtr pParent, dy = 32767; borderSize.y2 = dy; -#ifdef COMPOSITE /* * In redirected drawing case, reset universe to borderSize */ @@ -238,7 +231,6 @@ miComputeClips(WindowPtr pParent, compSetRedirectBorderClip (pParent, universe); RegionCopy(universe, &pParent->borderSize); } -#endif oldVis = pParent->visibility; switch (RegionContainsRect(universe, &borderSize)) { @@ -508,11 +500,9 @@ miTreeObscured(WindowPtr pParent) static RegionPtr getBorderClip(WindowPtr pWin) { -#ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) return compGetRedirectBorderClip(pWin); else -#endif return &pWin->borderClip; } diff --git a/mi/miwindow.c b/mi/miwindow.c index a4b97a7b8..3cde542be 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -315,7 +315,6 @@ miRecomputeExposures(WindowPtr pWin, void *value) RegionPtr pValid = (RegionPtr) value; if (pWin->valdata) { -#ifdef COMPOSITE /* * Redirected windows are not affected by parent window * gravity manipulations, so don't recompute their @@ -323,7 +322,6 @@ miRecomputeExposures(WindowPtr pWin, void *value) */ if (pWin->redirectDraw != RedirectDrawNone) return WT_DONTWALKCHILDREN; -#endif /* * compute exposed regions of this window */ @@ -567,11 +565,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, /* and move those bits */ - if (oldpt.x != x || oldpt.y != y -#ifdef COMPOSITE - || pWin->redirectDraw -#endif - ) { + if (oldpt.x != x || oldpt.y != y || pWin->redirectDraw) { (*pWin->drawable.pScreen->CopyWindow) (pWin, oldpt, gravitate[g]); } diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 0b626eba4..b7e2ae815 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -143,15 +143,12 @@ damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, RegionRec pixClip; int draw_x, draw_y; -#if defined(COMPOSITE) || defined(ROOTLESS) int screen_x = 0, screen_y = 0; -#endif /* short circuit for empty regions */ if (!RegionNotEmpty(pRegion)) return; -#if defined(COMPOSITE) || defined(ROOTLESS) /* * When drawing to a pixmap which is storing window contents, * the region presented is in pixmap relative coordinates which @@ -163,7 +160,6 @@ damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, } if (screen_x || screen_y) RegionTranslate(pRegion, screen_x, screen_y); -#endif if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr) (pDrawable))->backingStore == NotUseful) { @@ -202,7 +198,6 @@ damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, draw_x = pDamage->pDrawable->x; draw_y = pDamage->pDrawable->y; -#if defined(COMPOSITE) || defined(ROOTLESS) /* * Need to move everyone to screen coordinates * XXX what about off-screen pixmaps with non-zero x/y? @@ -211,7 +206,6 @@ damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x; draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y; } -#endif /* * Clip against border or pixmap bounds @@ -275,10 +269,8 @@ damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, if (pDamageRegion == pRegion && (draw_x || draw_y)) RegionTranslate(pDamageRegion, draw_x, draw_y); } -#if defined(COMPOSITE) || defined(ROOTLESS) if (screen_x || screen_y) RegionTranslate(pRegion, -screen_x, -screen_y); -#endif RegionUninit(&clippedRec); } diff --git a/present/present_scmd.c b/present/present_scmd.c index b60e1b143..9dcc73e63 100644 --- a/present/present_scmd.c +++ b/present/present_scmd.c @@ -135,9 +135,7 @@ present_check_flip(RRCrtcPtr crtc, /* Does the window match the pixmap exactly? */ if (window->drawable.x != 0 || window->drawable.y != 0 || -#if defined(COMPOSITE) || defined(ROOTLESS) window->drawable.x != pixmap->screen_x || window->drawable.y != pixmap->screen_y || -#endif window->drawable.width != pixmap->drawable.width || window->drawable.height != pixmap->drawable.height) { return FALSE;