[cairo] libcairowrap
Benjamin Otte
otte at gnome.org
Sat Dec 1 17:33:28 PST 2007
On Dec 1, 2007 9:31 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> I needed a mechanism for replaying cairo operations, with an emphasis on
> generating benchmarks, and similarly adapted libcairowrap. As the traces
> can grow very large, very quickly, I switched to using a binary file
> which could then be either replayed or printed. I included a simple hash
> table and tracked lifetime of objects in order to convert pointers back
> to short tokens - originally I used glib, but grew a little wary of
> trying to initialise it in a potentially multi-threaded library.
>
> Anyway just food for thought:
> git://annarchy.freedesktop.org/~ickle/cairo-trace
> http://cgit.freedesktop.org/~ickle/cairo-trace
>
> The downside of using an intermediate binary file is that is adds a
> burdensome extra step to when you just want to snoop. The benefit is
> that it allows for setting /etc/ld.so.preload and then capturing usage
> across an entire desktop.
>
The idea of using intermediate steps appeals to me. The idea of a
binary file format however does not. Is there anything that speaks
against having a "dump" step that dumps operations into a _readable_
format and one or multiple "transform" steps that create useful tests
or replayable operations out of it?
So in short: doing what you did but doing s/binary/text/ ?
> > Welcome, Benjamin! Please have fun hacking on cairo!
> /me breaks out the Champagne.
>
> Now you have no excuse but to implement filters for yourself. ;-)
>
This is very off-topic already, but my current plan is (if I ever get
to doing filters - filters don't influence functionality, they just
make Flash look weird in places) to implement filters in Swfdec with a
focus on merging it to cairo when its API suits me. This allows me to
evolve the filters code free from ciaro release dates. The only reason
to not do it this way would be if other people were actively pushing
for filters in their apps, too. But I haven't heard about anyone
interested in developing a filter implementation.
And to go even further off topic: What's the current state of the
operator patch?
Cheers,
Benjamin
More information about the cairo
mailing list