[cairo] Looking for some advices
Bryce Harrington
bryce at osg.samsung.com
Thu Aug 28 10:56:46 PDT 2014
On Thu, Aug 28, 2014 at 09:30:43AM +0200, Alexandre Bique wrote:
> Hi,
>
> I'm using cairo on Linux to render to screen.
>
> First I'd like to know the pros/cons of cairo's backends (xlib, xcb, gl).
You didn't mention the image backend, but that should be discussed
first. Its pros are that it is the most widely tested, has benefitted
from a lot of optimizations, and seems to renders the best of all the
backends. Since its a software renderer, performance is the principle
con, but actually for many uses it has quite acceptable performance.
In general you should prefer xcb over xlib. xcb is intended as the
replacement for xlib. From my testing you should see little performance
or functional difference between them.
For distributable applications to be run on Linux desktops, I think gl
can't be recommended. Most distributions don't ship with gl-enabled
cairo, so you'd have to jump through hoops to get it.
In theory, cairo-gl should be faster than cairo-xcb, at least for some
operations. In practice the performance tends to be kind of a mixed
bag. So if you're performance limited you might take a look to see if
using it would help.
Where gl (and egl) tends to be looked at the most is for embedded
devices, but often in those cases you can do better by using a different
drawing library more optimized for the egl case.
Bryce
More information about the cairo
mailing list