5.19.2009

On Compiz

The Compiz codebase is pretty intimidating. Last night I had the idea that I should begin documenting their code as I unravel it while trying to figure out what I need to do with it.

I don't think it is entirely a sure thing I can pull off all the screen correction effects that we want. I reread the paper of the people in Austria who did something similar, and for two paragraphs they describe their Compiz code at a high level. The description is helpful, but it may be a little bit beyond me. If not because of the concepts, because of the large (to me) codebase.

One thing I am especially worried about is pixel loss. It seems like if I straight away "trim" pixels, that they will get lost. Writing this sentence just now, I think I may have had an idea how that might work out though: Opengl texturing.

In the paper, it sounds like they create some number of polygons to represent their corrective surface and then texture-map the composited desktop onto that. I don't know the ins and outs of texturing, but maybe some of the Opengl options will let that texturing algorithm span gaps in the polygons w/o losing the pixels which would normally fall in. I do not really kniow, though. I'm still just unraveling the Compiz framework to let me get at that functionality, let alone brushing off my Opengl knowledge and taking a crack at the more advanced parts.

Another depressing part is the Compiz puts a pretty archaic set of constraints on the software versions in our system. To span a display across multiple GPU cores, we need something called the Xinerama extension. To use Compiz, we need something called the Composite extension. Unfortunately, right now, they are not compatible. Maybe if we were a year ahead in the future, they would work together in the "current" X server.

To get around that incompatibility, we use a third program: Xgl. Xgl essentially sits on top of Xinerama and beneath Composite so they work together. Unfortunately, XGL is deprecated so we can't easily use it past Ubuntu 8.04 (specifically, this is to say X.org server 1.4 I think.)

Ok, that is doable I suppose. But we are already installing boost libraries outside of apt for Davide, and this precludes us using MPX also: release-quality MPX only exists in the 1.6 X.org server.

I think XGL is the worst part of the setup because it kind of holds up everything else. But if we don't use XGL, we can't do the display correction across multiple GPUs because Compiz won't run because the Composite extension would be absent.

I think doing the display correction outside of Compiz would be an order of magnitude more difficult, because Compiz exposes this functionality and sits at the right spot in the graphics pipeline. To do the work in another spot would possibly mean rearchitecting many other components -- and I'm barely capable of doing it in Compiz anyway.

No comments:

Post a Comment