[cairo] Proposal: cairo_save_state/cairo_restore_state

Christian Biesinger cbiesinger at web.de
Tue Jan 24 05:52:37 PST 2006

Behdad Esfahbod wrote:
> On Tue, 24 Jan 2006, Christian Biesinger wrote:
>>Behdad Esfahbod wrote:
>>>You are right generally, but in this case, since saved states are
>>>immutable and cairo_t objects are not threadsafe anyway (cannot
>>>be used from two threads at the same time), I don't think any
>>>locking is needed, and the semantics I described does the job.
>>So can a state only be restored to the context from which it was created?
> No, definitely not.  That's the beauty of this cairo_state_t
> approach compared to cairo_copy I believe.

But, then there is still the threadsafety issue with a copy-on-write 
state, isn't there? The gstate has to be modifiable...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4762 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060124/2134b3fd/smime.bin

More information about the cairo mailing list