From c113bc77ae9d137bfd330640159ab7534a0b6e32 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 20:13:47 +0200 Subject: [PATCH] treewide: replace PICT_a1 by PIXMAN_a1 Try not to use old compat macros anymore, use the real ones instead. Signed-off-by: Enrico Weigelt, metux IT consult --- exa/exa_render.c | 8 ++++---- glamor/glamor.c | 4 ++-- glamor/glamor_picture.c | 4 ++-- glamor/glamor_priv.h | 2 +- glamor/glamor_trapezoid.c | 4 ++-- render/picture.c | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/exa/exa_render.c b/exa/exa_render.c index 74b1916340..b36002a3c6 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -66,7 +66,7 @@ exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n) case PICT_a8: snprintf(format, 20, "A8 "); break; - case PICT_a1: + case PIXMAN_a1: snprintf(format, 20, "A1 "); break; default: @@ -1067,7 +1067,7 @@ exaCreateAlphaPicture(ScreenPtr pScreen, if (!pPictFormat) { if (pDst->polyEdge == PolyEdgeSharp) - pPictFormat = PictureMatchFormat(pScreen, 1, PICT_a1); + pPictFormat = PictureMatchFormat(pScreen, 1, PIXMAN_a1); else pPictFormat = PictureMatchFormat(pScreen, 8, PICT_a8); if (!pPictFormat) @@ -1153,7 +1153,7 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, } else { if (pDst->polyEdge == PolyEdgeSharp) - maskFormat = PictureMatchFormat(pScreen, 1, PICT_a1); + maskFormat = PictureMatchFormat(pScreen, 1, PIXMAN_a1); else maskFormat = PictureMatchFormat(pScreen, 8, PICT_a8); for (; ntrap; ntrap--, traps++) @@ -1215,7 +1215,7 @@ exaTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, } else { if (pDst->polyEdge == PolyEdgeSharp) - maskFormat = PictureMatchFormat(pScreen, 1, PICT_a1); + maskFormat = PictureMatchFormat(pScreen, 1, PIXMAN_a1); else maskFormat = PictureMatchFormat(pScreen, 8, PICT_a8); diff --git a/glamor/glamor.c b/glamor/glamor.c index 71e033f1b8..f92af5aa8f 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -551,12 +551,12 @@ glamor_setup_formats(ScreenPtr screen) * on GLES2 due to lack of texture swizzle. */ if (glamor_priv->has_rg && glamor_priv->has_texture_swizzle) { - glamor_add_format(screen, 1, PICT_a1, + glamor_add_format(screen, 1, PIXMAN_a1, GL_R8, GL_RED, GL_UNSIGNED_BYTE, FALSE); glamor_add_format(screen, 8, PICT_a8, GL_R8, GL_RED, GL_UNSIGNED_BYTE, TRUE); } else { - glamor_add_format(screen, 1, PICT_a1, + glamor_add_format(screen, 1, PIXMAN_a1, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, FALSE); glamor_add_format(screen, 8, PICT_a8, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, TRUE); diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index c539587b2e..2f8c099004 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -60,7 +60,7 @@ static void byte_swap_swizzle(GLenum *swizzle) * Returns the GL format and type for uploading our bits to a given PictFormat. * * We may need to tell the caller to translate the bits to another - * format, as in PICT_a1 (which GL doesn't support). We may also need + * format, as in PIXMAN_a1 (which GL doesn't support). We may also need * to tell the GL to swizzle the texture on sampling, because GLES3 * doesn't support the GL_UNSIGNED_INT_8_8_8_8{,_REV} types, so we * don't have enough channel reordering options at upload time without @@ -84,7 +84,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen, swizzle[3] = GL_ALPHA; switch (format) { - case PICT_a1: + case PIXMAN_a1: *tex_format = glamor_priv->formats[1].format; *tex_type = GL_UNSIGNED_BYTE; *temp_format = PICT_a8; diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 0f76e144e4..303398c84b 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -634,7 +634,7 @@ const struct glamor_format *glamor_format_for_pixmap(PixmapPtr pixmap); /* Return whether 'picture' is alpha-only */ static inline Bool glamor_picture_is_alpha(PicturePtr picture) { - return picture->format == PICT_a1 || picture->format == PICT_a8; + return picture->format == PIXMAN_a1 || picture->format == PICT_a8; } /* Return whether 'picture' is storing alpha bits in the red channel */ diff --git a/glamor/glamor_trapezoid.c b/glamor/glamor_trapezoid.c index 405e061ace..f385aad690 100644 --- a/glamor/glamor_trapezoid.c +++ b/glamor/glamor_trapezoid.c @@ -51,7 +51,7 @@ glamor_create_mask_picture(ScreenPtr screen, if (!pict_format) { if (dst->polyEdge == PolyEdgeSharp) - pict_format = PictureMatchFormat(screen, 1, PICT_a1); + pict_format = PictureMatchFormat(screen, 1, PIXMAN_a1); else pict_format = PictureMatchFormat(screen, 8, PICT_a8); if (!pict_format) @@ -94,7 +94,7 @@ glamor_trapezoids(CARD8 op, */ if (!mask_format) { if (dst->polyEdge == PolyEdgeSharp) - mask_format = PictureMatchFormat(screen, 1, PICT_a1); + mask_format = PictureMatchFormat(screen, 1, PIXMAN_a1); else mask_format = PictureMatchFormat(screen, 8, PICT_a8); for (; ntrap; ntrap--, traps++) diff --git a/render/picture.c b/render/picture.c index dab0796210..72c49fee2f 100644 --- a/render/picture.c +++ b/render/picture.c @@ -171,7 +171,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) nformats = 0; /* formats required by protocol */ - formats[nformats].format = PICT_a1; + formats[nformats].format = PIXMAN_a1; formats[nformats].depth = 1; nformats++; formats[nformats].format = PICT_FORMAT(BitsPerPixel(8),