[cairo] Background image

Daniel Amelang daniel.amelang at gmail.com
Tue Feb 20 21:47:09 PST 2007


On 2/20/07, Olivier Jolet <olivier.jolet at skynet.be> wrote:
> Also, I have another problem of performance, if I use the
> 'cairo_set_line_width' primitive, it is very much slower. I don't
> understand why there is a such difference?

Neither do I. I don't think I'm understanding you. Do you mean that
when you call set_line_width, all subsequent stroking is slower than
when you don't? Obviously the call to cairo_set_line_width itself is
really fast, so I don't think you're referring to that.

> It's a little complicated to provide the code + data because it is based
> on a greater real time application.

Understandable. You could try capturing the data from a given run,
which would allow one to later replay the drawing without the need for
the full application. You already have all your drawing code
centralized in that small interpreter, so adding some logging
capabilities shouldn't be too painful. Come to think of it, you could
probably easily write out all that drawing data you already have in
that dlbuf variable I saw in your code.

Then there's always libcairowrap, which does something similar:

http://people.freedesktop.org/~jrmuizel/libcairowrap-0.1.tar.gz

To get effective performance help from the list, you should try to
provide something like

- your app with instructions on how to run it or
- just your drawing code with data and instructions on how to run it or
- a profile
- the output of a run with libcairowrap

Otherwise, it just feels like shooting in the dark.

Dan


More information about the cairo mailing list