[cairo] cairo-trace and cairo-perf-trace with new backend

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 13 04:42:58 PDT 2009


Excerpts from aymen chehaider's message of Tue Oct 13 12:13:37 +0100 2009:
> I have developped a new backend for Cairo 1.9.2. *(Embedded environment)*
> 
> I want to know, how can I test perfs of this new backend ???
> 
> How can I use cairo-trace and cairo-perf-trace for this backend ?

First I presume that you have coupled in the boilerplate/ for your
backend and are satisfied with the results from the test suite.
 
> I have tried to use cairo-trace : *cairo-trace --profile my_application*
> the result in the file is : *% Unknown object of type cairo_surface_t, trace
> is incomplete.*

Indeed, it means that util/cairo-trace/trace.c does not have the
appropriate hook for backend surface constructor. Simply add the
relevant function wrappers by doing a copy'n'paste from one of the other
backends.

But recording new traces is not strictly relevant for performance
testing, since you can just use the existing traces from cairo-traces.git
with cairo-perf-trace. The trick here is that cairo-perf-trace uses a
default value of FALSE for target_is_measurable(), so you need to add
your surface type to that switch. And the same for the micro-benchmark
suite, called cairo-perf for 1.9.2. And whilst we're on that subject,
beware the interface changes that are in master.

Hope this helps, and you have fun with cairo. Please do share any
experiences you gained whilst developing a novel backend -- especially
if they may help shape the internal interfaces both for easing
maintenance and improving performance.
-ickle
-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list