[PATCH xserver] render: Store and use all 16bpc of precision for solid pixels (v2)

Adam Jackson ajax at redhat.com
Mon Feb 26 16:30:47 UTC 2018


On Mon, 2018-02-26 at 17:00 +0100, Michel Dänzer wrote:
> On 2018-02-26 04:33 PM, Adam Jackson wrote:
> > This plumbs the full width color for solid pictures through to fb, exa,
> > and glamor. External drivers and acceleration code may wish to make a
> > similar change for sufficiently new servers.
> > 
> > v2: Don't break ABI (Michel Dänzer)
> > 
> > Signed-off-by: Adam Jackson <ajax at redhat.com>
> 
> [...]
> 
> > diff --git a/fb/fbpict.c b/fb/fbpict.c
> > index 7ea0b668f8..759f0d5db7 100644
> > --- a/fb/fbpict.c
> > +++ b/fb/fbpict.c
> > @@ -220,20 +220,10 @@ static pixman_image_t *
> >  create_solid_fill_image(PicturePtr pict)
> >  {
> >      PictSolidFill *solid = &pict->pSourcePict->solidFill;
> > -    pixman_color_t color;
> > -    CARD32 a, r, g, b;
> > +    /* pixman_color_t and xRenderColor have the same layout */
> > +    pixman_color_t *color = (pixman_color_t *)&solid->color;
> 
> This should be ->fullcolor, shouldn't it?

Argh, yes. C is just delightful.

- ajax


More information about the xorg-devel mailing list