Window-level image compositing

By placing all top-level window contents in off-screen memory, an external application can construct the overall screen image using those contents along with arbitrary additional graphics. Keeping the capabilities within the X server simple and general will enable a wide range of compositing manager experimentation.

Read more about this work on the X server project page here at freedesktop.org.

I work at the HP Cambridge Research Laboratory.

Screenshot giantclock.png


Just a screenshot with a big version of the freedesktop clock program.

Screenshot sharp_shadow.png


This image was made by changing the compositing manager to construct shadows on the fly from the alpha channel of the window itself. That means the shadows follow the shape of the window precisely. However, because the X server has no gaussian blur operation (yet), there wasn't a way to soften the shadow edges. Of particular note are the precise shadows made of the characters and cursor inside the translucent terminal window.

Screenshot translucentapps.png


I've hacked xterm to have a translucent background with opaque text. The text is painted twice, slightly offset to improve the contrast. Also see the fancy new freedesktop clock. You can purchase a physical version of that clock at the freedesktop store

Screenshot screen4.png


This image has a giant translucent window covering most of the screen. I took the SVG image and set it's overall translucency to 0.8 so that you can see through that image to the other windows.

Screenshot screen3.png


Demonstrates a large number of windows with alpha channels (ARGB windows). The xsvg application was modified to select the ARGB visual. Note that the images are anti-aliased against the underlying windows, not just clipped to pixel boundaries.

In this case, the compositing manager was changed to not place a drop shadow underneath the ARGB windows; this gives full control of the compositing to the application. The compositing manager *could* add a shadow, but the Render extension doesn't have a Gaussian blur operation so the compositing manager would need to compute the shadow client-side.

You'll also see quite a few pieces of window manager decoration surrounding the translucent windows. While metacity was hacked to select the right visual for translucency to work, it draws most things with the core protocol which has no idea what alpha values are and so leaves them zero (or transparent). Fixing that will take more work.

Screenshot screen2.png


The first demonstration of windows containing alpha channels. This is done by creating a new visual that is 32 bits deep holding 8 bits each of red, green and blue along with an additional 8 bits of alpha value that determine the per-pixel opacity within the window. The compositing manager then simply composites those windows with the underlying image.

Screenshot screen1.png


A sample Gnome desktop showing drop shadows and translucent menus. The screen image is constructed by storing each top level window in an offscreen image (with the Composite extension) and having an external agent (the compositing manager) monitor application modifications to those windows (with the Damage extension) and updating the image on the screen using regular rendering operations (using either core protocol or Render extension drawing requests).