xrender issue

Hans-Peter Budek peter.budek at gmx.de
Fri Nov 4 09:30:31 PDT 2011


Hi,
> 
> So what I think you want to achieve is:
> 
>   dst = a * srcA + (1-a) * srcB

yes, that's my intension

> 
> which can be acheived (and hitting the accelerated paths) with:
> 
>   Picture a = XRenderCreateSolidFill(dpy, &(XRenderColor){.alpha = 0xffff * Fade});
>   Picture ia = XRenderCreateSolidFill(dpy, &(XRenderColor){.alpha = 0xffff * (1-Fade)});
>   XRenderComposite(dpy, PictOpSrc, srcA, a, dst, 0, 0, 0, 0, 0, 0, width, height);
>   XRenderComposite(dpy, PictOpAdd, srcB, ia, dst, 0, 0, 0, 0, 0, 0, width, height);
>   XRenderFreePicture(dpy, ia);
>   XRenderFreePicture(dpy, a);
> -Chris
> 
That work's much better (and avoids the crash). I thought the third parameter
of XRenderComposite() is something like a clipmask (after reading
http://www.x.org/releases/current/doc/renderproto/renderproto.txt), but it is
the missing multiplier.

I will use your approach.
Thank you very much.

Peter

Anyway, I wrote a little programm to reproduce the bug.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash.c
Type: text/x-c
Size: 1977 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20111104/c18b0dec/attachment.bin>


More information about the xorg mailing list