[cairo] Bug with paint_with_alpha andperfissues when compositing with SOURCE
cairo at antoineazar.com
Tue May 27 14:50:42 PDT 2008
> You can't express:
> dest_c = src_c * mask_a + dest_c * (1 - mask_a)
> Like that because we have two different bits of input going
> into the combining 'src_c * mask_a' and 'mask_a'. (You can
> get around this if mask_a is a constant value) That's why you
> need two passes to implement it.
If you have a copy of dest_c in a different texture (say dest_c2), then you
can send to the GPU the src_c, mask_a, and dest_c2 textures and do it all in
one pass, with output directly in dest_c.
> I've heard rumors that programmable combination with the
> destination is going to be possible in future versions of GLSL...
It might be planned for the future, but it will surely use some sort of copy
of the texture behind the scenes...it breaks the parallel architecture of
GPUs if you can have the same texture as read and write.
More information about the cairo