From 803355e874d8ee35ce1b579e482e2dd33c14b51a Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 5 Aug 2025 19:09:20 +0200 Subject: [PATCH] treewide: replace PICT_FORMAT_TYPE by PIXMAN_FORMAT_TYPE 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_render.c | 6 +++--- glamor/glamor_render.c | 14 +++++++------- glamor/glamor_utils.h | 8 ++++---- render/mipict.c | 2 +- render/picture.c | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/composite/compinit.c b/composite/compinit.c index 791c1183a1..efe7741718 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -260,7 +260,7 @@ compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, /* Initialize the visual */ visual->bitsPerRGBValue = 8; - if (PICT_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) { + if (PIXMAN_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) { visual->class = PseudoColor; visual->nplanes = PIXMAN_FORMAT_BPP(alt->format); visual->ColormapEntries = 1 << visual->nplanes; diff --git a/exa/exa_render.c b/exa/exa_render.c index dbddff72ad..0ad22c2212 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -149,7 +149,7 @@ exaGetPixelFromRGBA(CARD32 *pixel, *pixel = 0; if (!PICT_FORMAT_COLOR(pFormat->format) && - PICT_FORMAT_TYPE(pFormat->format) != PICT_TYPE_A) + PIXMAN_FORMAT_TYPE(pFormat->format) != PICT_TYPE_A) return FALSE; rbits = PICT_FORMAT_R(pFormat->format); @@ -181,7 +181,7 @@ exaGetRGBAFromPixel(CARD32 pixel, int rbits, bbits, gbits; int rshift, bshift, gshift, ashift; - if (!PICT_FORMAT_COLOR(format) && PICT_FORMAT_TYPE(format) != PICT_TYPE_A) + if (!PICT_FORMAT_COLOR(format) && PIXMAN_FORMAT_TYPE(format) != PICT_TYPE_A) return FALSE; rbits = PICT_FORMAT_R(format); @@ -906,7 +906,7 @@ exaComposite(CARD8 op, (PICT_FORMAT_COLOR(pDst->format) && PICT_FORMAT_COLOR(pSrc->format) && pDst->format == PICT_FORMAT(PIXMAN_FORMAT_BPP(pSrc->format), - PICT_FORMAT_TYPE(pSrc->format), + PIXMAN_FORMAT_TYPE(pSrc->format), 0, PICT_FORMAT_R(pSrc->format), PICT_FORMAT_G(pSrc->format), diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 97a1ccf99c..7b6087d071 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -759,21 +759,21 @@ combine_pict_format(PictFormatShort * des, const PictFormatShort src, switch (in_ca) { case glamor_program_alpha_normal: - src_type = PICT_FORMAT_TYPE(src); + src_type = PIXMAN_FORMAT_TYPE(src); mask_type = PICT_TYPE_A; break; case glamor_program_alpha_ca_first: - src_type = PICT_FORMAT_TYPE(src); - mask_type = PICT_FORMAT_TYPE(mask); + src_type = PIXMAN_FORMAT_TYPE(src); + mask_type = PIXMAN_FORMAT_TYPE(mask); break; case glamor_program_alpha_ca_second: src_type = PICT_TYPE_A; - mask_type = PICT_FORMAT_TYPE(mask); + mask_type = PIXMAN_FORMAT_TYPE(mask); break; case glamor_program_alpha_dual_blend: case glamor_program_alpha_dual_blend_gles2: - src_type = PICT_FORMAT_TYPE(src); - mask_type = PICT_FORMAT_TYPE(mask); + src_type = PIXMAN_FORMAT_TYPE(src); + mask_type = PIXMAN_FORMAT_TYPE(mask); break; default: return FALSE; @@ -1552,7 +1552,7 @@ glamor_composite_clipped_region(CARD8 op, || (PICT_FORMAT_COLOR(dest->format) && PICT_FORMAT_COLOR(source->format) && dest->format == PICT_FORMAT(PIXMAN_FORMAT_BPP(source->format), - PICT_FORMAT_TYPE(source->format), + PIXMAN_FORMAT_TYPE(source->format), 0, PICT_FORMAT_R(source->format), PICT_FORMAT_G(source->format), diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index f2fbf915c5..7fe9a84ca3 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -601,22 +601,22 @@ glamor_get_rgba_from_pixel(CARD32 pixel, bbits = PICT_FORMAT_B(format); int abits = PIXMAN_FORMAT_A(format); - if (PICT_FORMAT_TYPE(format) == PICT_TYPE_A) { + if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_A) { rshift = gshift = bshift = ashift = 0; } - else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { + else if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { bshift = 0; gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; } - else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { + else if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; } - else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { + else if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { ashift = 0; rshift = abits; if (abits == 0) diff --git a/render/mipict.c b/render/mipict.c index 2b73322876..07fe5e0ac0 100644 --- a/render/mipict.c +++ b/render/mipict.c @@ -444,7 +444,7 @@ miIsSolidAlpha(PicturePtr pSrc) pScreen = pSrc->pDrawable->pScreen; /* Alpha-only */ - if (PICT_FORMAT_TYPE(pSrc->format) != PICT_TYPE_A) + if (PIXMAN_FORMAT_TYPE(pSrc->format) != PICT_TYPE_A) return FALSE; /* repeat */ if (!pSrc->repeat) diff --git a/render/picture.c b/render/picture.c index b3ac5ce846..6c4fe44f75 100644 --- a/render/picture.c +++ b/render/picture.c @@ -292,7 +292,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) pFormats[f].depth = formats[f].depth; format = formats[f].format; pFormats[f].format = format; - switch (PICT_FORMAT_TYPE(format)) { + switch (PIXMAN_FORMAT_TYPE(format)) { case PICT_TYPE_ARGB: pFormats[f].type = PictTypeDirect;