What Mechanism does compiz use when copying from a xclient's frontbuffer to the backbuffer of root window?

488 views Asked by At

What Mechanism does compiz use when copying from a xclient's frontbuffer to the backbuffer of root window?

I can't seem to find this procedure in the compiz source. Is there a function that it calls whenever the xclient's window' frontbuffer is updated to update the root backbuffer?

1

There are 1 answers

4
datenwolf On

Copiz uses the X Composite extension to redirect windows into an offscreen pixmap. Then it uses the GLX_EXT_texture_from_pixmap extension to GLX/OpenGL to transfer those offscreen pixmaps into OpenGL textures.

For composition a Composite enabled X server provides a special composite window layer, which is placed between the root window (and windows of which the root window is the parent) and the screen saver layer. Compiz creates a window in that composite layer, creates a OpenGL context for that window and performs composition using OpenGL drawing commands.

There are also compositors that don't use OpenGL. They then either use server side composition (which is rather useless, except for testing the Composite protocol itself) or they use XRender drawing methods. Technically X core drawing methods would work, too, but those don't support transformations and scaling; things you'd normally want to have for a compositor.

Nothing is drawn to the root window by a compositor. All composition goes to the composite layer.