[cairo] After 'set_line_width', subsequent stroking isslow [ Background image]

Olivier Jolet olivier.jolet at skynet.be
Wed Feb 21 07:53:02 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).
> 
> behdad

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

Oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pict_out.png
Type: image/png
Size: 64544 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070221/81118f3b/Pict_out-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pict_in.png
Type: image/png
Size: 49652 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070221/81118f3b/Pict_in-0001.png


More information about the cairo mailing list