[cairo] Best strategy for complex screen drawing

Jeff Smith whydoubt at yahoo.com
Mon Nov 21 05:28:57 PST 2005


--- Timothée Lecomte <timothee.lecomte at ens.fr> wrote:
> Dear Cairo specialists,
> 
> In practice, my concern is that I would like to reach reasonable drawing
> speed with a large number of polygons (this number is around 10000 for a
> complex plot).
> 
> Such a drawing with ~10000 polygons (in cairo : filled paths made of 4
> lines) takes approximately 5 seconds with a generic image surface or a
> xlib surface created by gdk (via gdk_cairo_create).

In my limited experience, I have found that for more complex images most of the time is
spent in stroke and fill functions.  This will be a near-constant time as long as the
backend does not have its own callback for stroke and fill.  In this case, the fallback
functions are used, which are just not that fast.  Stroke is the worse of the two because
lines can actually be fairly complex.

 -- Jeff Smith


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the cairo mailing list