[cairo] After 'set_line_width',
subsequent stroking is slow [ Background image]
Olivier Jolet
olivier.jolet at skynet.be
Wed Feb 21 03:48:07 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.
>
> Yes, I think it's exactly that. When I do not call set_line_width, all
> subsequent stroking is faster.
>
> > > 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.
> >
> > Dan
>
> I will try.
>
> Oli
WITHOUT SET_WIDTH WITH SET_WIDTH
================= ==============
Primitives : 5340 Primitives : 5340
TIME to draw: 68.813 msec TIME to draw: 397.58 msec
Primitives : 5346 Primitives : 5346
TIME to draw: 63.405 msec TIME to draw: 297.517 msec
Primitives : 5345 Primitives : 5345
TIME to draw: 62.746 msec TIME to draw: 287.675 msec
Primitives : 5322 Primitives : 5321
TIME to draw: 64.246 msec TIME to draw: 291.121 msec
Primitives : 5209 Primitives : 5210
TIME to draw: 63.504 msec TIME to draw: 246.034 msec
Primitives : 5171 Primitives : 5165
TIME to draw: 63.391 msec TIME to draw: 244.956 msec
More information about the cairo
mailing list