[cairo] Help required with redraw problems

David Reveman c99drn at cs.umu.se
Fri Mar 26 16:30:15 PST 2004


On Thu, 2004-03-25 at 18:02 -0700, Soorya Kuloor wrote:

> Hi Carl,
> 
> We are using cairo on a real-time schematic display application. We have run 
> into some serious problems during redraws. The schematic displays have 
> animated parts that flash with alternating colors when there are problems 
> with the monitored system. When the flashing happens cairo consumes more CPU 
> cycles than is acceptable. We think the only choice for us is to speed up 
> Cairo. We need speed up of atleast by a factor of 2 and we have until Monday 
> to do this :-((.
> 
> We are using cairo version 0.1.17. We are using the pixman backend and we 
> cannot use Render backend. Would there be any benefits to moving to a newer 
> version? May be the OpenGL backend? Is there any particular part of Cairo or 
> the libpixman, that we can speed up? We do not use any sophisticated 
> capabilities such as transparency or pattern based fills. We use text (a 
> lot).

hmm, the OpenGL backend might do it, but text will be the bottleneck
with the current GL backend patches, especially if you use a lot of it.
This is because cairo render each glyph using freetype and then transfer
it to the backend every time a glyph is drawn. A few weeks ago I hacked
cairo_ft_font.c a little so that it cached glyphs. The results were
great, text rendering went from the bottleneck to insignificant compared
to the other drawing operations.

I've put my hacked version of cairo_ft_font.c in
http://www.cs.umu.se/~c99drn/
if you like to have a look at it. It's a bit old so I'm not sure it will
work with the current version of cairo.

The OpenGL backend together with some kind of text hack like mine, would
give you some great speed improvements. Maybe just a font hack would do
it for you.

- David

-- 
David Reveman <c99drn at cs.umu.se>





More information about the cairo mailing list