[Lazarus] Cairo library usage

Luiz Americo Pereira Camara luizmed at oi.com.br
Sat May 17 15:12:50 CEST 2008


Graeme Geldenhuys wrote:
> 2008/5/17 Graeme Geldenhuys <graemeg.lists at gmail.com>:
>   
>> That is strange. The first complaint I here that it is slow.  I ran
>>     
>
> OK, I did some more Google'ing. It seems Cairo does have some
> performance issues, but I can't remember to which version of Cairo
> they used.  What I did notice from all my searching is that it is
> really unfair to compare Qt vector graphics to anything else!  Qt is
> simply miles ahead of anybody else in performance. See image.
>
> http://chaos.troll.no/~zrusin/vectorframeworks.png
> http://zrusin.blogspot.com/2006/10/benchmarks.html
>   

Probably Qt is still faster than cairo but the gap maybe smaller.

The test was with an aged cairo version. Recently a lot of optimizations 
are being done in cairo by taking advantage of using mmx/sse.

There's also an GSoC project to improve the polygon rasterizer.

Unfortunately, the OpenGL backend is still experimental but there are 
plans to doing hardware accelerated. A quote from a Mozilla/cairo dev:
"Yep, the plan is to move to hardware accelerated rendering using OpenGL 
and/or DirectX as appropriate. We probably wont’ be using Glitz though, 
but will develop a different backend for OpenGL/DX as glitz is heavily 
unmaintained at the moment and there are some things we’d like to do 
differently. But work on that probably won’t start for another few 
months at least."

Under MACOSX, is already hardware accelerated since uses quartz as 
backend (http://blog.vlad1.com/2008/03/16/cairo-16-quartz-and-gecko/).

One of the reasons of Firefox 3 speed up 
(http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9068118&intsrc=hm_list) 
is the use of cairo (http://blog.vlad1.com/2007/12/11/graphics-in-mozilla/)

Luiz





More information about the Lazarus mailing list