From 35a43252ca8bca604f3cc682d1c4e4f9ec0f25d4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 19:41:23 +0200 Subject: [PATCH] treewide: replace PICT_a8r8g8b8 by PIXMAN_a8r8g8b8 Try not to use old compat macros anymore, use the real ones instead. Signed-off-by: Enrico Weigelt, metux IT consult --- composite/compinit.c | 2 +- exa/exa_glyphs.c | 6 +++--- exa/exa_render.c | 4 ++-- glamor/glamor.c | 4 ++-- glamor/glamor_composite_glyphs.c | 2 +- glamor/glamor_picture.c | 2 +- glamor/glamor_render.c | 6 +++--- hw/kdrive/ephyr/ephyrcursor.c | 2 +- mi/midispcur.c | 2 +- render/picture.c | 4 ++-- render/render.c | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/composite/compinit.c b/composite/compinit.c index b5bbe895b..b51acc0c6 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -223,7 +223,7 @@ static CompAlternateVisual altVisuals[] = { #if COMP_INCLUDE_RGB24_VISUAL {24, PICT_r8g8b8}, #endif - {32, PICT_a8r8g8b8}, + {32, PIXMAN_a8r8g8b8}, }; static Bool diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c index 1ea4a0c3d..81242ee55 100644 --- a/exa/exa_glyphs.c +++ b/exa/exa_glyphs.c @@ -93,11 +93,11 @@ exaGlyphsInit(ScreenPtr pScreen) pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 32; i++; - pExaScr->glyphCaches[i].format = PICT_a8r8g8b8; + pExaScr->glyphCaches[i].format = PIXMAN_a8r8g8b8; pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 16; i++; - pExaScr->glyphCaches[i].format = PICT_a8r8g8b8; + pExaScr->glyphCaches[i].format = PIXMAN_a8r8g8b8; pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 32; i++; @@ -737,7 +737,7 @@ exaGlyphs(CARD8 op, * without component-alpha) */ FreePicture((void *) pMask, (XID) 0); - argbFormat = PictureMatchFormat(pScreen, 32, PICT_a8r8g8b8); + argbFormat = PictureMatchFormat(pScreen, 32, PIXMAN_a8r8g8b8); if (argbFormat) maskFormat = argbFormat; diff --git a/exa/exa_render.c b/exa/exa_render.c index 7ed0ef6f4..04a67c27a 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -45,7 +45,7 @@ exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n) } switch (pict->format) { - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: snprintf(format, 20, "ARGB8888"); break; case PICT_x8r8g8b8: @@ -193,7 +193,7 @@ exaGetRGBAFromPixel(CARD32 pixel, bshift = pFormat->direct.blue; ashift = pFormat->direct.alpha; } - else if (format == PICT_a8r8g8b8) { + else if (format == PIXMAN_a8r8g8b8) { rshift = 16; gshift = 8; bshift = 0; diff --git a/glamor/glamor.c b/glamor/glamor.c index 76352e957..7b793c5dc 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -586,12 +586,12 @@ glamor_setup_formats(ScreenPtr screen) assert(X_BYTE_ORDER == X_LITTLE_ENDIAN); glamor_add_format(screen, 24, PICT_x8r8g8b8, GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE, TRUE); - glamor_add_format(screen, 32, PICT_a8r8g8b8, + glamor_add_format(screen, 32, PIXMAN_a8r8g8b8, GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE, TRUE); } else { glamor_add_format(screen, 24, PICT_x8r8g8b8, GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE); - glamor_add_format(screen, 32, PICT_a8r8g8b8, + glamor_add_format(screen, 32, PIXMAN_a8r8g8b8, GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE); } diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c index 93797fc41..288031354 100644 --- a/glamor/glamor_composite_glyphs.c +++ b/glamor/glamor_composite_glyphs.c @@ -586,7 +586,7 @@ glamor_composite_glyphs_init(ScreenPtr screen) glamor_priv->glyph_atlas_a = glamor_alloc_glyph_atlas(screen, 8, PICT_a8); if (!glamor_priv->glyph_atlas_a) return FALSE; - glamor_priv->glyph_atlas_argb = glamor_alloc_glyph_atlas(screen, 32, PICT_a8r8g8b8); + glamor_priv->glyph_atlas_argb = glamor_alloc_glyph_atlas(screen, 32, PIXMAN_a8r8g8b8); if (!glamor_priv->glyph_atlas_argb) { free (glamor_priv->glyph_atlas_a); return FALSE; diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index 019729ca2..6d4d3d023 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -110,7 +110,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen, break; case PICT_x8r8g8b8: - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: if (!glamor_priv->is_gles) { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_INT_8_8_8_8_REV; diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 088c02c8e..d4e4e9aff 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -861,9 +861,9 @@ glamor_render_format_is_supported(PicturePtr picture) switch (picture->format) { case PICT_a2r10g10b10: return storage_format == PICT_x2r10g10b10; - case PICT_a8r8g8b8: + case PIXMAN_a8r8g8b8: case PICT_x8r8g8b8: - return storage_format == PICT_a8r8g8b8 || storage_format == PICT_x8r8g8b8; + return storage_format == PIXMAN_a8r8g8b8 || storage_format == PICT_x8r8g8b8; case PICT_a1r5g5b5: return storage_format == PICT_x1r5g5b5; default: @@ -1446,7 +1446,7 @@ glamor_convert_gradient_picture(ScreenPtr screen, pFormat = source->pFormat; format = pFormat->format; } else { - format = PICT_a8r8g8b8; + format = PIXMAN_a8r8g8b8; pFormat = PictureMatchFormat(screen, 32, format); } diff --git a/hw/kdrive/ephyr/ephyrcursor.c b/hw/kdrive/ephyr/ephyrcursor.c index ac7a245f2..5fa39d8a9 100644 --- a/hw/kdrive/ephyr/ephyrcursor.c +++ b/hw/kdrive/ephyr/ephyrcursor.c @@ -136,7 +136,7 @@ ephyrRealizeARGBCursor(EphyrScrPriv *scr, CursorPtr cursor) xcb_image_t *image; int w = cursor->bits->width, h = cursor->bits->height; - /* dix' storage is PICT_a8r8g8b8 */ + /* dix' storage is PIXMAN_a8r8g8b8 */ source = xcb_generate_id(conn); xcb_create_pixmap(conn, 32, source, scr->win, w, h); diff --git a/mi/midispcur.c b/mi/midispcur.c index 24702b35c..fabbb9f4a 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -188,7 +188,7 @@ miDCRealize(ScreenPtr pScreen, CursorPtr pCursor) int error; PicturePtr pPicture; - pFormat = PictureMatchFormat(pScreen, 32, PICT_a8r8g8b8); + pFormat = PictureMatchFormat(pScreen, 32, PIXMAN_a8r8g8b8); if (!pFormat) return FALSE; diff --git a/render/picture.c b/render/picture.c index 5e6d87265..7bde94543 100644 --- a/render/picture.c +++ b/render/picture.c @@ -178,7 +178,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) PIXMAN_TYPE_A, 8, 0, 0, 0); formats[nformats].depth = 8; nformats++; - formats[nformats].format = PICT_a8r8g8b8; + formats[nformats].format = PIXMAN_a8r8g8b8; formats[nformats].depth = 32; nformats++; formats[nformats].format = PICT_x8r8g8b8; @@ -838,7 +838,7 @@ createSourcePicture(void) pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; - pPicture->format = PICT_a8r8g8b8; + pPicture->format = PIXMAN_a8r8g8b8; SetPictureToDefaults(pPicture); return pPicture; diff --git a/render/render.c b/render/render.c index f09371cf4..3d88cbf5c 100644 --- a/render/render.c +++ b/render/render.c @@ -1508,7 +1508,7 @@ ProcRenderCreateCursor(ClientPtr client) pScreen->SourceValidate(pSrc->pDrawable, 0, 0, width, height, IncludeInferiors); - if (pSrc->format == PICT_a8r8g8b8) { + if (pSrc->format == PIXMAN_a8r8g8b8) { (*pScreen->GetImage) (pSrc->pDrawable, 0, 0, width, height, ZPixmap, 0xffffffff, (void *) argbbits); @@ -1519,7 +1519,7 @@ ProcRenderCreateCursor(ClientPtr client) PictFormatPtr pFormat; int error; - pFormat = PictureMatchFormat(pScreen, 32, PICT_a8r8g8b8); + pFormat = PictureMatchFormat(pScreen, 32, PIXMAN_a8r8g8b8); if (!pFormat) { free(argbbits); free(srcbits);