PDA

View Full Version : What is xcb? Its adoption?


Regenwald
11-27-2008, 02:15 PM
Hi,

i often read about xcb, the xlib's successor. but i simply can't understand its function. i don't get it. furthermore, are there already programs using it (seems like toolkits such as qt, gtk+ and cairo??)? what is its advantage? is it already in the xserver? or is it just planed that in a long distant future, xcb is going to make xlib obsolete?
can someone explain me it? thanks...
edit: http://www.linuxshowcase.org/2001/full_papers/massey/massey.pdf this all sounds great but doesn't help. and what's about its current status? already part of xorg?

TechMage89
11-27-2008, 08:55 PM
I can't answer all of your questions, but here's a brief rundown of what I know about XCB:

It's designed to provide a simpler, lower-level api without all of the automatic caching and other extras of xlib, which are intended to improve performance, but often end up increasing latency.

A lot of frameworks (e.g. cairo) are making efforts to combine their xlib and xcb backends, basically making the xcb backend a super-set of the xlib backend, so that the xcb backend basically rests as a layer of code between the xlib backend and the xcb library (I think I understood that correctly).

szczerb
11-28-2008, 12:59 AM
It definitely is available with xorg, but I don't know if every distro builds with it. In Gentoo it's selected with a USE flag.

BTW compiz-fusion runs like crap without it, so my guess is that most distribusions have it.

curaga
11-28-2008, 08:29 AM
It can be used in multithreading apps, with xlib you have to have only one drawing thread. And the latest version of xcb depends on Python (yuck)

RealNC
11-28-2008, 01:28 PM
I great deal of people are using it because of compiz.

Regenwald
12-02-2008, 02:08 PM
i read that there are several window managers which use xcb instead of xlib. therefore, they seem to be really fast. gtk+ 3.0 and qt should really use it :/

RealNC
12-02-2008, 07:28 PM
They do use it if X itself is compiled against xcb :/