diff --git a/exa/exa_render.c b/exa/exa_render.c index 7d69d831a..5a6aad7a0 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -143,7 +143,6 @@ exaGetPixelFromRGBA(CARD32 *pixel, CARD16 green, CARD16 blue, CARD16 alpha, PictFormatPtr pFormat) { - int bbits; int rshift, bshift, gshift, ashift; *pixel = 0; @@ -154,7 +153,7 @@ exaGetPixelFromRGBA(CARD32 *pixel, int rbits = PIXMAN_FORMAT_R(pFormat->format); int gbits = PIXMAN_FORMAT_G(pFormat->format); - bbits = PICT_FORMAT_B(pFormat->format); + int bbits = PIXMAN_FORMAT_B(pFormat->format); int abits = PIXMAN_FORMAT_A(pFormat->format); rshift = pFormat->direct.red; @@ -178,7 +177,6 @@ exaGetRGBAFromPixel(CARD32 pixel, CARD16 *alpha, PictFormatPtr pFormat, PictFormatShort format) { - int bbits; int rshift, bshift, gshift, ashift; if (!PIXMAN_FORMAT_COLOR(format) && PIXMAN_FORMAT_TYPE(format) != PICT_TYPE_A) @@ -186,7 +184,7 @@ exaGetRGBAFromPixel(CARD32 pixel, int rbits = PIXMAN_FORMAT_R(format); int gbits = PIXMAN_FORMAT_G(format); - bbits = PICT_FORMAT_B(format); + int bbits = PIXMAN_FORMAT_B(format); int abits = PIXMAN_FORMAT_A(format); if (pFormat) { @@ -910,7 +908,7 @@ exaComposite(CARD8 op, 0, PIXMAN_FORMAT_R(pSrc->format), PIXMAN_FORMAT_G(pSrc->format), - PICT_FORMAT_B(pSrc->format))))) + PIXMAN_FORMAT_B(pSrc->format))))) || (op == PictOpOver && pSrc->format == pDst->format && !PIXMAN_FORMAT_A(pSrc->format)))) { if (!pSrc->repeat && xSrc >= 0 && ySrc >= 0 && diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c index 5eb03976a..348ffb269 100644 --- a/glamor/glamor_render.c +++ b/glamor/glamor_render.c @@ -1556,7 +1556,7 @@ glamor_composite_clipped_region(CARD8 op, 0, PIXMAN_FORMAT_R(source->format), PIXMAN_FORMAT_G(source->format), - PICT_FORMAT_B(source->format))))) + PIXMAN_FORMAT_B(source->format))))) || (op == PictOpOver && source->format == dest->format && !PIXMAN_FORMAT_A(source->format))) diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 7c061439b..740db739c 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -593,12 +593,11 @@ glamor_get_rgba_from_pixel(CARD32 pixel, float *green, float *blue, float *alpha, CARD32 format) { - int bbits; int rshift, bshift, gshift, ashift; int rbits = PIXMAN_FORMAT_R(format); int gbits = PIXMAN_FORMAT_G(format); - bbits = PICT_FORMAT_B(format); + int bbits = PIXMAN_FORMAT_B(format); int abits = PIXMAN_FORMAT_A(format); if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_A) { diff --git a/render/picture.c b/render/picture.c index 8410612be..08f69b35e 100644 --- a/render/picture.c +++ b/render/picture.c @@ -301,18 +301,18 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) if (pFormats[f].direct.alphaMask) pFormats[f].direct.alpha = (PIXMAN_FORMAT_R(format) + PIXMAN_FORMAT_G(format) + - PICT_FORMAT_B(format)); + PIXMAN_FORMAT_B(format)); pFormats[f].direct.redMask = Mask (PIXMAN_FORMAT_R(format)); pFormats[f].direct.red = (PIXMAN_FORMAT_G(format) + - PICT_FORMAT_B(format)); + PIXMAN_FORMAT_B(format)); pFormats[f].direct.greenMask = Mask (PIXMAN_FORMAT_G(format)); - pFormats[f].direct.green = PICT_FORMAT_B(format); + pFormats[f].direct.green = PIXMAN_FORMAT_B(format); - pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format)); + pFormats[f].direct.blueMask = Mask (PIXMAN_FORMAT_B(format)); pFormats[f].direct.blue = 0; break; @@ -323,11 +323,11 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) pFormats[f].direct.alphaMask = Mask (PIXMAN_FORMAT_A(format)); if (pFormats[f].direct.alphaMask) - pFormats[f].direct.alpha = (PICT_FORMAT_B(format) + + pFormats[f].direct.alpha = (PIXMAN_FORMAT_B(format) + PIXMAN_FORMAT_G(format) + PIXMAN_FORMAT_R(format)); - pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format)); + pFormats[f].direct.blueMask = Mask (PIXMAN_FORMAT_B(format)); pFormats[f].direct.blue = (PIXMAN_FORMAT_G(format) + PIXMAN_FORMAT_R(format)); @@ -344,21 +344,21 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) case PICT_TYPE_BGRA: pFormats[f].type = PictTypeDirect; - pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format)); + pFormats[f].direct.blueMask = Mask (PIXMAN_FORMAT_B(format)); pFormats[f].direct.blue = - (PIXMAN_FORMAT_BPP(format) - PICT_FORMAT_B(format)); + (PIXMAN_FORMAT_BPP(format) - PIXMAN_FORMAT_B(format)); pFormats[f].direct.greenMask = Mask (PIXMAN_FORMAT_G(format)); pFormats[f].direct.green = - (PIXMAN_FORMAT_BPP(format) - PICT_FORMAT_B(format) - + (PIXMAN_FORMAT_BPP(format) - PIXMAN_FORMAT_B(format) - PIXMAN_FORMAT_G(format)); pFormats[f].direct.redMask = Mask (PIXMAN_FORMAT_R(format)); pFormats[f].direct.red = - (PIXMAN_FORMAT_BPP(format) - PICT_FORMAT_B(format) - + (PIXMAN_FORMAT_BPP(format) - PIXMAN_FORMAT_B(format) - PIXMAN_FORMAT_G(format) - PIXMAN_FORMAT_R(format)); pFormats[f].direct.alphaMask = Mask (PIXMAN_FORMAT_A(format));