[cairo] performance of cairo in a larger application

Øyvind Kolås islewind at gmail.com
Wed Jun 16 16:58:25 PDT 2004


I have ported all non native gtk+ widgets of bauxite[1] to use
gtkcairo now, some parts of the ui are useable, and some are more
sluggish.

The only change needed to make gtkcairo transparently use glitz
instead is setting the
enviroment variable GTKCAIRO_BACKEND=gl , ui response is increased a
lot, it allows the video display to playback hardware scaled in real
time, adjustments made with the custom brightness/contrast widget[2]
using a gradient, fills, strokes and a short text string updates are
quite continous between the two, some lag is probably introduced in
the processing[3]. A significant boost can be achieved for this
widget, using both xlib and glitz by commenting away the text string.

The widget that has the worst performance is the timeline editor /
sequence editor,
seen in the bottom of the screenshot[2]. When zoomed in[4]  it renders
quite snappily using both the glitz and cairo backend, but when the
number of clips increase interactivity drops to zero[5] (<1fps).

The application is usable when using glitz, apart from a small issue
when closing[6], but during use it is fantastic. Is there any part of
the code in the stack of the xlib/xrender based backend that could use
a couple of eyeballs?

Apart from that I hope this update gives some idea of what these
various demands ui elements using cairo can have.

/Øyvind K.

[1] bauxite
[2] screenshot -
http://freedesktop.org/~pippin/bauxite/screenshots/2004-06-17.png
[3] processing -the image brightness contrast calculations are
calculated in floating point, and
thus are a significant factor for the non snappiness of the video display.
[4] zoomed in sequence editor - the widget does it's own preclipping
by not asking for rendering of clips outside the screen
[5] due to this performance hit  I need to edit more zoomed in than
comfortable sometimes, and I edit the project in chapters to avoid the
ui usability barrier <g>.
[6] The X server chrases, and I have to log back in, starting related
applications as well. :-|




More information about the cairo mailing list