Premultiplied alpha handle for driver

Jonathan Morton jonathan.morton at
Fri Jun 4 02:52:03 PDT 2010

>        I still want to get understand to you CA operation on rendercheck.
>        I see the code, the mask is not a simple PICT_A8 format, it is a 32 bit value, and each 8 bit alpha value for A, R, G, B?

Let me have a close look at the Pixman implementation of this, to make
sure I know the right answer.

>        By the way, why the code need use XRenderChangePicture to modify the attribute of CPComponentAlpha. Is it used as to modify the Repeat attribute?

XRender uses attributes to control the rendering in various ways.  If
you receive any attributes through EXA which you are not absolutely
sure you know how to handle, you should reject the acceleration
request and allow it to be done in software (by Pixman).

Without the ComponentAlpha attribute, all mask operations are done
using only the Alpha channel of the mask image, even if more
components exist.  This is true even if a mask image with no alpha
channel is used (which, while a bit silly, is legal - remember that
alpha is treated as 1.0 if the format can't represent it).  With the
attribute, the formula is changed to take the other components into

>        And what is the aim of color_correct()?

In Rendercheck?  I don't know, haven't read it.

 - Jonathan Morton

More information about the xorg-devel mailing list