Srichand,
Just following up what we were talking about earlier,
If you read the comment at line 24 of
src/bindings/org/freedesktop/cairo/Plumbing.java, you'll see where I
mentioned that having this slaved to be the same object as Gdk.lock is
probably unnecessary and in the way of us using Cairo from multiple
threads simultaneously[1].
However, note that if you're doing drawing to write to screen or
otherwise do a Widget, you'll be doing so in the EXPOSE_EVENT handler
hooked up for that Widget, and **that will occur within the GDK lock**
anyway. So really, concurrency is all a non-starter insofar as Widget
drawing is concerned.
HOWEVER, almost every widget in every application on your desktop calls
Cairo to do its drawing in its 'expose-event', and gee, guess what,
everything is fine. Computers are fast at some things. More to the
point, the people who wrote Cairo know what they're about.
All in all this is probably not worth worrying about at the moment,
certainly in view of the serious bit of engineering that would be
necessary to make the code generator write synchronized blocks
conditionally. So you can concentrate on transforms and such if it
interests you.
AfC
Sydney
[1]: following the hypothesis that such a things are actually allowed
in Cairo. It certainly isn't with gdk-pixbuf but that's a different
library and GDK has clear rules about this stuff. See also
http://bugzilla.gnome.org/show_bug.cgi?id=534573
--
Andrew Frederick Cowie
Operational Dynamics is an operations and engineering consultancy
focusing on IT strategy, organizational architecture, systems
review, and effective procedures for change management. We actively
carry out research and development in these areas on behalf of our
clients, and enable successful use of open source in their mission
critical enterprises, worldwide.
http://www.operationaldynamics.com/
Sydney New York Toronto London
|