diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c index 4ec50d4521..3b9e7333c8 100644 --- a/exa/exa_glyphs.c +++ b/exa/exa_glyphs.c @@ -138,7 +138,7 @@ exaUnrealizeGlyphCaches(ScreenPtr pScreen, unsigned int format) } } -#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) +#define NeedsComponent(f) (PIXMAN_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) /* All caches for a single format share a single pixmap for glyph storage, * allowing mixing glyphs of different sizes without paying a penalty diff --git a/exa/exa_render.c b/exa/exa_render.c index 49a4fdbc63..10d58e52ca 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -143,7 +143,7 @@ exaGetPixelFromRGBA(CARD32 *pixel, CARD16 green, CARD16 blue, CARD16 alpha, PictFormatPtr pFormat) { - int rbits, bbits, gbits, abits; + int rbits, bbits, gbits; int rshift, bshift, gshift, ashift; *pixel = 0; @@ -155,7 +155,7 @@ exaGetPixelFromRGBA(CARD32 *pixel, rbits = PICT_FORMAT_R(pFormat->format); gbits = PICT_FORMAT_G(pFormat->format); bbits = PICT_FORMAT_B(pFormat->format); - abits = PICT_FORMAT_A(pFormat->format); + int abits = PIXMAN_FORMAT_A(pFormat->format); rshift = pFormat->direct.red; gshift = pFormat->direct.green; @@ -178,7 +178,7 @@ exaGetRGBAFromPixel(CARD32 pixel, CARD16 *alpha, PictFormatPtr pFormat, PictFormatShort format) { - int rbits, bbits, gbits, abits; + int rbits, bbits, gbits; int rshift, bshift, gshift, ashift; if (!PICT_FORMAT_COLOR(format) && PICT_FORMAT_TYPE(format) != PICT_TYPE_A) @@ -187,7 +187,7 @@ exaGetRGBAFromPixel(CARD32 pixel, rbits = PICT_FORMAT_R(format); gbits = PICT_FORMAT_G(format); bbits = PICT_FORMAT_B(format); - abits = PICT_FORMAT_A(format); + int abits = PIXMAN_FORMAT_A(format); if (pFormat) { rshift = pFormat->direct.red; @@ -889,7 +889,7 @@ exaComposite(CARD8 op, pSrc->repeat = 0; if (!pMask && !pSrc->alphaMap && !pDst->alphaMap && - (op == PictOpSrc || (op == PictOpOver && !PICT_FORMAT_A(pSrc->format)))) + (op == PictOpSrc || (op == PictOpOver && !PIXMAN_FORMAT_A(pSrc->format)))) { if (pSrc->pDrawable ? (pSrc->pDrawable->width == 1 && pSrc->pDrawable->height == 1 && @@ -912,7 +912,7 @@ exaComposite(CARD8 op, PICT_FORMAT_G(pSrc->format), PICT_FORMAT_B(pSrc->format))))) || (op == PictOpOver && pSrc->format == pDst->format && - !PICT_FORMAT_A(pSrc->format)))) { + !PIXMAN_FORMAT_A(pSrc->format)))) { if (!pSrc->repeat && xSrc >= 0 && ySrc >= 0 && (xSrc + width <= pSrc->pDrawable->width) && (ySrc + height <= pSrc->pDrawable->height)) { diff --git a/fb/fbtrap.c b/fb/fbtrap.c index edb3cc44ca..86017b1fc5 100644 --- a/fb/fbtrap.c +++ b/fb/fbtrap.c @@ -126,7 +126,7 @@ fbShapes(CompositeShapesFunc composite, } } else { - switch (PICT_FORMAT_A(maskFormat->format)) { + switch (PIXMAN_FORMAT_A(maskFormat->format)) { case 1: format = PIXMAN_a1; break; diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c index 7e12dafbf2..019729ca24 100644 --- a/glamor/glamor_picture.c +++ b/glamor/glamor_picture.c @@ -226,7 +226,7 @@ glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen, return FALSE; } - if (!PICT_FORMAT_A(format)) + if (!PIXMAN_FORMAT_A(format)) swizzle[3] = GL_ONE; return TRUE; diff --git a/glamor/glamor_program.c b/glamor/glamor_program.c index bf1b33ac70..5cd3c59ded 100644 --- a/glamor/glamor_program.c +++ b/glamor/glamor_program.c @@ -507,7 +507,7 @@ glamor_set_blend(CARD8 op, glamor_program_alpha alpha, PicturePtr dst) /* If there's no dst alpha channel, adjust the blend op so that we'll treat * it as always 1. */ - if (PICT_FORMAT_A(dst->format) == 0 && op_info->dest_alpha) { + if (PIXMAN_FORMAT_A(dst->format) == 0 && op_info->dest_alpha) { if (src_blend == GL_DST_ALPHA) src_blend = GL_ONE; else if (src_blend == GL_ONE_MINUS_DST_ALPHA) diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index e69f9cc35a..c72ada085c 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -532,7 +532,7 @@ glamor_set_composite_op(ScreenPtr screen, /* If there's no dst alpha channel, adjust the blend op so that we'll treat * it as always 1. */ - if (PICT_FORMAT_A(dest->format) == 0 && op_info->dest_alpha) { + if (PIXMAN_FORMAT_A(dest->format) == 0 && op_info->dest_alpha) { if (source_blend == GL_DST_ALPHA) source_blend = GL_ONE; else if (source_blend == GL_ONE_MINUS_DST_ALPHA) @@ -640,7 +640,7 @@ glamor_set_composite_texture(glamor_screen_private *glamor_priv, int unit, * is RGB (no alpha), which we use for 16bpp textures. */ if (glamor_pixmap_priv_is_large(pixmap_priv) || - (!PICT_FORMAT_A(picture->format) && + (!PIXMAN_FORMAT_A(picture->format) && repeat_type == RepeatNone && picture->transform)) { glamor_pixmap_fbo_fix_wh_ratio(wh, pixmap, pixmap_priv); glUniform4fv(wh_location, 1, wh); @@ -941,7 +941,7 @@ glamor_composite_choose_shader(CARD8 op, goto fail; } else { - if (PICT_FORMAT_A(source->format)) + if (PIXMAN_FORMAT_A(source->format)) key.source = SHADER_SOURCE_TEXTURE_ALPHA; else key.source = SHADER_SOURCE_TEXTURE; @@ -959,7 +959,7 @@ glamor_composite_choose_shader(CARD8 op, goto fail; } else { - if (PICT_FORMAT_A(mask->format)) + if (PIXMAN_FORMAT_A(mask->format)) key.mask = SHADER_MASK_TEXTURE_ALPHA; else key.mask = SHADER_MASK_TEXTURE; @@ -1066,12 +1066,12 @@ glamor_composite_choose_shader(CARD8 op, * because we wire the alpha to 1. * **/ - if (!PICT_FORMAT_A(saved_source_format) - && PICT_FORMAT_A(mask->format)) + if (!PIXMAN_FORMAT_A(saved_source_format) + && PIXMAN_FORMAT_A(mask->format)) key.source = SHADER_SOURCE_TEXTURE; - if (!PICT_FORMAT_A(mask->format) - && PICT_FORMAT_A(saved_source_format)) + if (!PIXMAN_FORMAT_A(mask->format) + && PIXMAN_FORMAT_A(saved_source_format)) key.mask = SHADER_MASK_TEXTURE; } @@ -1559,7 +1559,7 @@ glamor_composite_clipped_region(CARD8 op, PICT_FORMAT_B(source->format))))) || (op == PictOpOver && source->format == dest->format - && !PICT_FORMAT_A(source->format))) + && !PIXMAN_FORMAT_A(source->format))) && x_source >= 0 && y_source >= 0 && (x_source + width) <= source->pDrawable->width && (y_source + height) <= source->pDrawable->height) { diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 170d3a329b..eb4831ec8b 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -593,13 +593,13 @@ glamor_get_rgba_from_pixel(CARD32 pixel, float *green, float *blue, float *alpha, CARD32 format) { - int rbits, bbits, gbits, abits; + int rbits, bbits, gbits; int rshift, bshift, gshift, ashift; rbits = PICT_FORMAT_R(format); gbits = PICT_FORMAT_G(format); bbits = PICT_FORMAT_B(format); - abits = PICT_FORMAT_A(format); + int abits = PIXMAN_FORMAT_A(format); if (PICT_FORMAT_TYPE(format) == PICT_TYPE_A) { rshift = gshift = bshift = ashift = 0; diff --git a/render/glyph.c b/render/glyph.c index 3f6b8cbf00..8a68467e2a 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -542,7 +542,7 @@ GlyphExtents(int nlist, GlyphListPtr list, GlyphPtr * glyphs, BoxPtr extents) } } -#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) +#define NeedsComponent(f) (PIXMAN_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) void CompositeGlyphs(CARD8 op, diff --git a/render/picture.c b/render/picture.c index adad1f4a67..5e59c46e1a 100644 --- a/render/picture.c +++ b/render/picture.c @@ -296,7 +296,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) case PICT_TYPE_ARGB: pFormats[f].type = PictTypeDirect; - pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); + pFormats[f].direct.alphaMask = Mask (PIXMAN_FORMAT_A(format)); if (pFormats[f].direct.alphaMask) pFormats[f].direct.alpha = (PICT_FORMAT_R(format) + @@ -320,7 +320,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) case PICT_TYPE_ABGR: pFormats[f].type = PictTypeDirect; - pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); + pFormats[f].direct.alphaMask = Mask (PIXMAN_FORMAT_A(format)); if (pFormats[f].direct.alphaMask) pFormats[f].direct.alpha = (PICT_FORMAT_B(format) + @@ -361,7 +361,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) - PICT_FORMAT_G(format) - PICT_FORMAT_R(format)); - pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); + pFormats[f].direct.alphaMask = Mask (PIXMAN_FORMAT_A(format)); pFormats[f].direct.alpha = 0; break; @@ -370,7 +370,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) pFormats[f].type = PictTypeDirect; pFormats[f].direct.alpha = 0; - pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); + pFormats[f].direct.alphaMask = Mask (PIXMAN_FORMAT_A(format)); /* remaining fields already set to zero */ break; @@ -1431,7 +1431,7 @@ ReduceCompositeOp(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, * picture. */ no_src_alpha = PICT_FORMAT_COLOR(pSrc->format) && - PICT_FORMAT_A(pSrc->format) == 0 && + PIXMAN_FORMAT_A(pSrc->format) == 0 && (pSrc->repeatType != RepeatNone || (!pSrc->transform && xSrc >= 0 && ySrc >= 0 && @@ -1439,7 +1439,7 @@ ReduceCompositeOp(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, ySrc + height <= pSrc->pDrawable->height)) && pSrc->alphaMap == NULL && pMask == NULL; no_dst_alpha = PICT_FORMAT_COLOR(pDst->format) && - PICT_FORMAT_A(pDst->format) == 0 && pDst->alphaMap == NULL; + PIXMAN_FORMAT_A(pDst->format) == 0 && pDst->alphaMap == NULL; /* TODO, maybe: Conjoint and Disjoint op reductions? */ diff --git a/render/render.c b/render/render.c index 5e1e1983d2..b42d0ff6da 100644 --- a/render/render.c +++ b/render/render.c @@ -989,7 +989,7 @@ typedef struct _GlyphNew { unsigned char sha1[20]; } GlyphNewRec, *GlyphNewPtr; -#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) +#define NeedsComponent(f) (PIXMAN_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) static int ProcRenderAddGlyphs(ClientPtr client)