From 9f4391203f38c84ebc448f214803fb928e795135 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 19:48:06 +0200 Subject: [PATCH] treewide: replace PICT_TYPE_A by PIXMAN_TYPE_A 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 | 4 ++-- glamor/glamor_render.c | 8 ++++---- glamor/glamor_utils.h | 2 +- render/mipict.c | 2 +- render/picture.c | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/exa/exa_render.c b/exa/exa_render.c index 5a6aad7a02..7ed0ef6f49 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -148,7 +148,7 @@ exaGetPixelFromRGBA(CARD32 *pixel, *pixel = 0; if (!PIXMAN_FORMAT_COLOR(pFormat->format) && - PIXMAN_FORMAT_TYPE(pFormat->format) != PICT_TYPE_A) + PIXMAN_FORMAT_TYPE(pFormat->format) != PIXMAN_TYPE_A) return FALSE; int rbits = PIXMAN_FORMAT_R(pFormat->format); @@ -179,7 +179,7 @@ exaGetRGBAFromPixel(CARD32 pixel, { int rshift, bshift, gshift, ashift; - if (!PIXMAN_FORMAT_COLOR(format) && PIXMAN_FORMAT_TYPE(format) != PICT_TYPE_A) + if (!PIXMAN_FORMAT_COLOR(format) && PIXMAN_FORMAT_TYPE(format) != PIXMAN_TYPE_A) return FALSE; int rbits = PIXMAN_FORMAT_R(format); diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index d5e3619b69..088c02c8e3 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -735,8 +735,8 @@ glamor_flush_composite_rects(ScreenPtr screen) } static const int pict_format_combine_tab[][3] = { - {PIXMAN_TYPE_ARGB, PICT_TYPE_A, PIXMAN_TYPE_ARGB}, - {PIXMAN_TYPE_ABGR, PICT_TYPE_A, PIXMAN_TYPE_ABGR}, + {PIXMAN_TYPE_ARGB, PIXMAN_TYPE_A, PIXMAN_TYPE_ARGB}, + {PIXMAN_TYPE_ABGR, PIXMAN_TYPE_A, PIXMAN_TYPE_ABGR}, }; static Bool @@ -760,14 +760,14 @@ combine_pict_format(PictFormatShort * des, const PictFormatShort src, switch (in_ca) { case glamor_program_alpha_normal: src_type = PIXMAN_FORMAT_TYPE(src); - mask_type = PICT_TYPE_A; + mask_type = PIXMAN_TYPE_A; break; case glamor_program_alpha_ca_first: src_type = PIXMAN_FORMAT_TYPE(src); mask_type = PIXMAN_FORMAT_TYPE(mask); break; case glamor_program_alpha_ca_second: - src_type = PICT_TYPE_A; + src_type = PIXMAN_TYPE_A; mask_type = PIXMAN_FORMAT_TYPE(mask); break; case glamor_program_alpha_dual_blend: diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 62f7dce140..ed6e99abf8 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -600,7 +600,7 @@ glamor_get_rgba_from_pixel(CARD32 pixel, int bbits = PIXMAN_FORMAT_B(format); int abits = PIXMAN_FORMAT_A(format); - if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_A) { + if (PIXMAN_FORMAT_TYPE(format) == PIXMAN_TYPE_A) { rshift = gshift = bshift = ashift = 0; } else if (PIXMAN_FORMAT_TYPE(format) == PIXMAN_TYPE_ARGB) { diff --git a/render/mipict.c b/render/mipict.c index 07fe5e0ac0..02faaca066 100644 --- a/render/mipict.c +++ b/render/mipict.c @@ -444,7 +444,7 @@ miIsSolidAlpha(PicturePtr pSrc) pScreen = pSrc->pDrawable->pScreen; /* Alpha-only */ - if (PIXMAN_FORMAT_TYPE(pSrc->format) != PICT_TYPE_A) + if (PIXMAN_FORMAT_TYPE(pSrc->format) != PIXMAN_TYPE_A) return FALSE; /* repeat */ if (!pSrc->repeat) diff --git a/render/picture.c b/render/picture.c index 7fe9727219..00e21030f4 100644 --- a/render/picture.c +++ b/render/picture.c @@ -175,7 +175,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) formats[nformats].depth = 1; nformats++; formats[nformats].format = PICT_FORMAT(BitsPerPixel(8), - PICT_TYPE_A, 8, 0, 0, 0); + PIXMAN_TYPE_A, 8, 0, 0, 0); formats[nformats].depth = 8; nformats++; formats[nformats].format = PICT_a8r8g8b8; @@ -366,7 +366,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) pFormats[f].direct.alpha = 0; break; - case PICT_TYPE_A: + case PIXMAN_TYPE_A: pFormats[f].type = PictTypeDirect; pFormats[f].direct.alpha = 0; @@ -647,7 +647,7 @@ PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) else { if ((formats[n].direct.redMask | formats[n].direct.blueMask | formats[n].direct.greenMask) == 0) - type = PICT_TYPE_A; + type = PIXMAN_TYPE_A; else if (formats[n].direct.red > formats[n].direct.blue) type = PIXMAN_TYPE_ARGB; else if (formats[n].direct.red == 0)