[cairo] why cairo is so slow on Windows, is there any plan to improve cairo performance on Windows?

Owen Taylor otaylor at redhat.com
Mon Jun 29 13:01:49 PDT 2009

On Mon, 2009-06-29 at 12:48 +0800, Rainman Lee wrote:
> Hi everyone,
> I use cairo on windows for a while. I found that cairo was so slow
> whenever fill a surface to another with scaling, rotating, or even a
> non-integer translaton. I compared it with GDI+, which is at least 7
> times faster than cairo :(
> It seems that if a source pixel can not map to a dest pixel which has
> an integer coordinate, cairo will use a subpixel algorithm, and it
> will terribly hurt the performance. I made a filling test, firstly by
> a 0.5 pixel step horz translation transform, and a 1 pixel step horz
> translation transform then, each of which looped 100 times. the first
> case was extremely slow than the second one.
> Is there any idea to speed up cairo in this case? I tryed to set
> antialias with none, but it had no effect.

Only a very small subset of Cairo can be done using hardware
acceleration via the GDI API. For everything else, if your bitmap
is in video memory (a DDB) Cairo will need to read, make the changes
and write back. This is very slow.

For complex rendering, you are much better off rendering to a DIB.

- Owen

More information about the cairo mailing list