Bumblebee-Project/bumblebeed — Issue #37: Replace VGL with a Compositing Window Manager.
Author: Thulinma
Created: 2012-01-16 21:05:11+00:00
State: open
Labels: Discussion

so, this is my idea for a possible v4.0 or something:

I'm sure you guys have heard and/or know about compositing window managers.
Any (one at a time, max) application can register themselves with an X server as such a display manager.
Usually this stuff is used for fancy 3D effects and all that crap we don't really care about, think compiz, for example.

The cool part is that in this "mode", all windows get their own framebuffer, off-screen. We can obviously still do this on the nvidia card even though there is no real desktop active.

I want to connect to :8 as such a window manager, and instead of drawing all windows to :8, draw them to :0.

To compare:
* VirtualGL works by capturing the window first, encoding (to for example JPEG), transferring over a socket, decoding, then finally drawing to the screen. Input goes similarly, but in the reverse direction. That means the screen image data is copied at least SIX times - twice in socket buffers, twice for encoding, twice for decoding. More if they didn't bother doing this efficiently, and since it is meant to be used over a network their biggest bottleneck is probably network speed, not drawing speed.
* windump works by capturing the window, transferring over a socket, then drawing to the screen. No encoding/decoding here, so it's obviously quite a bit faster.
* My proposed method would not do any capturing (after all - the framebuffer is readily available) and directly copy the window framebuffer to the other screen. One copy operation. In theory that's at least twice as fast as anything else out there, in practice it will most likely be somewhere around 10-100 times as fast. Proper framerates might even be a possibility here! ;-)

Note: This all sounds great, but it is an amount of work not to be underestimated. We should plan and spread out the tasks properly if we want this to work well.

Thoughts?