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

Gerdus van Zyl gerdusvanzyl at gmail.com
Mon Jun 29 04:35:34 PDT 2009


The antialiasing has nothing to do with it. Rendering is normally fast
when you have integer coordinates which with rotation you never have.
Cairo works by falling back to it's own internal rendering if it can't
get the correct output using the target backend (GDI). (which in this
case is why it's slower than GDI)

The cairo from the GTK website should be fine.

Depending on what you are trying to render, caching the result in a
long lived surface will help a lot. If you can describe what you are
drawing we might be of more help.

~Gerdus

On Mon, Jun 29, 2009 at 1:04 PM, Rainman Lee<rainman.lee at gmail.com> wrote:
> I do not need subpixel rendering, but I donot know how to disable it.
> My test version is 1.8.6, and I got it from GTK web site.
> Did you have tested cario_fill(a png) with rotation transforms from 0
> to 360 degree?
> It is very slow even if I set antialias with none.
>
> On Mon, Jun 29, 2009 at 4:38 PM, Gerdus van Zyl<gerdusvanzyl at gmail.com> wrote:
>> Nothing I know about. Firstly do you really need subpixel rendering?
>>
>> Where did you get your cairo? Newer versions are generally faster also
>> check to see if it was compiled with SSE enhancement, etc.
>>
>> If the speed is a real problem you could always use GDI+ there are
>> ways you can mix cairo and GDI rendering, though it won't be that
>> easy.
>>
>> On Mon, Jun 29, 2009 at 6:48 AM, Rainman Lee<rainman.lee at gmail.com> 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.
>>>
>>> Thank you!
>>>
>>> Rainman.
>>> _______________________________________________
>>> cairo mailing list
>>> cairo at cairographics.org
>>> http://lists.cairographics.org/mailman/listinfo/cairo
>>>
>> _______________________________________________
>> cairo mailing list
>> cairo at cairographics.org
>> http://lists.cairographics.org/mailman/listinfo/cairo
>>
>


More information about the cairo mailing list