Subject: Add support for the A8 (PICT_TYPE_A) format mask for accelerated compositing From: Arjan van de Ven Compositing currently gets to a software fallback if the mask is PICT_TYPE_A (alpha mask only). Digging into this, the cause is that uxa_get_rgba_from_pixel does not know how to deal with this format.... yet getting rgba from alpha-only is not exactly rocket science. This patch adds a case for PICT_TYPE_A to uxa_get_rgba_from_pixel() to deal with this. With this patch, X cpu usage is reduced by one second during the boot phase of the Moblin OS. diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index 525f75b..ebdc270 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -179,7 +179,15 @@ uxa_get_rgba_from_pixel(CARD32 pixel, int rbits, bbits, gbits, abits; int rshift, bshift, gshift, ashift; - if (!PICT_FORMAT_COLOR(format)) + if (PICT_FORMAT_TYPE(format) == PICT_TYPE_A) { + *red = 0; + *green = 0; + *blue = 0; + *alpha = pixel << 8; + return TRUE; + } + + if (!PICT_FORMAT_COLOR(format)) return FALSE; rbits = PICT_FORMAT_R(format);