[cairo] Cairo across processes, with TEE ?

Stuart Axon stuaxo2 at yahoo.com
Fri Feb 14 13:37:05 CET 2014


Ah, this is interesting - I will definitely have a look at the SHM option for cross-process drawing.

For recording surfaces + the network:
Does the recording surface save the drawing commands to a buffer that I can then pass across the network, or would I serialise the commands that I was going to feed into a recording surface on the other side of the network ?

 

S++



On Friday, February 14, 2014 12:27 PM, Krzysztof Kosiński <tweenk.pl at gmail.com> wrote:
 
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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20140214/c778600e/attachment.html>


More information about the cairo mailing list