[cairo] After 'set_line_width',
subsequent stroking isslow [ Background image]
olivier.jolet at skynet.be
Wed Feb 21 07:51:56 PST 2007
> On Wed, 2007-02-21 at 03:03 -0500, Olivier Jolet wrote:
> > > 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?
> So what are you setting line width to and what coordinates are you
> using for stroking? Depending on those, the drawn line may completely
> include opaque pixels (fast), or composited antialiased translucent
> pixels (slow).
I am setting line width because as you can see on the joined pictures,
when I zoom in, the lines width have to graw. (The line width is
integer) I also tried with antialiasing disable 'cairo_set_antialias(cr,
CAIRO_ANTIALIAS_NONE);' But the performances are almost similar.
Nevertheless, I'm going to capture the data to make possible the replay
of the drawing so you can see that more concretely.
WITH SET_LINE & NO ANTIALIAS WITH SET_LINE & ANTIALIAS
Primitives : 5340 Primitives : 5340
TIME to draw: 308.979 msec TIME to draw: 356.56 msec
Primitives : 5346 Primitives : 5346
TIME to draw: 352.716 msec TIME to draw: 354.748 msec
Primitives : 5345 Primitives : 5345
TIME to draw: 557.981 msec TIME to draw: 326.366 msec
Primitives : 5339 Primitives : 5339
TIME to draw: 280.786 msec TIME to draw: 309.679 msec
Primitives : 5248 Primitives : 5248
TIME to draw: 239.36 msec TIME to draw: 277.694 msec
Primitives : 5219 Primitives : 5219
TIME to draw: 245.218 msec TIME to draw: 311.997 msec
More information about the cairo