Question

I was using this approach to make the background of my OpenGL application transparent (in collaboration with Compiz).

It works perfect but there is one fact I was recognizing: As soon as my application opens the transparent window (no matter if any OpenGL drawing is done), the Xorg process CPU load increases to ~30%.

Can anyone explain this behavior? I was thinking that the Xserver is bypassed by this approach and the whole processing is done by the graphics card?

Était-ce utile?

La solution

Can anyone explain this behavior? I was thinking that the Xserver is bypassed by this approach and the whole processing is done by the graphics card?

The X server is not circumvented, just other parts of it are used. The thing with compositing is, that the window contents are represented as a X drawable (a pixmap), which the X server manages. In order to composit it, the X server must carry out the transfer into a texture, requested by the compositor. This may cause some management overhead, hence the drop in performance.

Also the code of most the compositors out there is horrible (its like the people who wrote Compiz/Metacity/KWin have no idea at all how OpenGL and GPUs works). This is one of the projects I have in my TODO list (writing a decent compositor, that's not lobotomized).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top