[cairo] Help required with redraw problems
Carl Worth
cworth at east.isi.edu
Fri Mar 26 07:28:57 PST 2004
On Mar 25, Soorya Kuloor wrote:
> 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.
To examine this, my first questions would be application-level
issues. Are you redrawing more elements than necessary at each
refresh? It would be great if everything in cairo were just fast
enough that you never had to think about this, but I don't think we're
there yet, (except for maybe with the OpenGL backend).
One application-level thing that I've done, (for example in grrobot),
is to cache the rendering of complicated graphics into a surface and
then just display them with cairo_show_surface. It's not too much work
to still maintain a high-quality scalable interface by just redrawing
the graphics whenever the scale changes. So, an approach like that
might help you. (Of course, this approach wouldn't help if what you
want to do is animated scaling, but it doesn't sound like you require
that much.)
> 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
> :-((.
There is quite a bit of room for improvement in the cairo
implementation, as the code has not been optimized at all yet. But I
don't know offhand of any hotspots that could be quickly addressed in
a weekend. Profiling would be necessary first.
> 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?
I'm not aware of any recent performance improvements, and there's
certainly nothing dramatic. So I wouldn't expect an upgrade to help
you much.
> May be the OpenGL backend?
I don't have personal experience with the OpenGL backend yet, so I
can't comment too much on it. I have been told that it is extremely
fast, (and I'm looking forward to seeing it in action when David and
Peter's present their Usenix paper this July [1]).
If your systems already do have direct rendered GLX working, (test
with glxinfo or glxgears), then this may be a good option for you.
Good luck,
-Carl
[1] http://www.usenix.org/events/usenix04/tech/freenix.html
More information about the cairo
mailing list