[cairo] Cairo across processes, with TEE ?

Krzysztof Kosiński tweenk.pl at gmail.com
Fri Feb 14 13:27:15 CET 2014


2014-02-13 14:46 GMT+01:00 Stuart Axon <stuaxo2 at yahoo.com>:
> Hi,
>    I've been playing with zeromq to send drawing commands over between two
> processes, drawing them with cairo at the end and I noticed the cairo-tee
> backend - does this do something similar ?

As far as I can see, cairo-tee works only within a single process.

To delegate drawing to a different process, I think the easiest way is
to create a shared memory segment that backs an image surface and
write to it in one process then read it in the other. You would need
to ensure that there is no concurrent write access to the surface, and
call cairo_surface_mark_dirty() after the drawing from the second
process is finished.

If you need to do this over a network, you could use the recording
surface and send the serialized data to a different host for replay.

Regards, Krzysztof


More information about the cairo mailing list