Some ideas how XComposite could be improved
keithp at keithp.com
Mon Nov 19 21:19:00 PST 2007
On Tue, 2007-11-20 at 06:01 +0100, Dennis Kasprzyk wrote:
> I thought a while about the current XComposite functionality and found some
> points that could be improved.
> ARGB windows currently have to be drawn with premultiplied alpha. This leads
> to dark (black) areas of the window, if no composite manager is used. Most of
> the ARGB windows would look better in a non composited environment if non
> premultiplied alpha could be used. The composite extension could provide 2
> argb visuals (one for premultiplied alpha and one for non premultiplied
> alpha) to inform the composite manager how to draw the window correctly. An
> application developer could then choose the best visual for his application.
The Composite extension doesn't actually enforce any interpretation of
the extra bits in the pixel. It's only a convention that we use
premultiplied alpha. Premultiplied alpha is also a lot easier to compute
as it doesn't suffer from divide-by-zero issues with transparent pixels.
> Another problem is the XShape extension. XShape currently also clippes drawing
> operations to the redirected pixmap. If this could be disabled, an ARGB
> application could use XShape to have a shape when no composite manager is
> running, but also inform the composite manager (with a window hint) to ignore
> the XShape informations to paint the whole window pixmap. With something like
> this an application could be correctly shaped when no composite manager is
> running, but provide nice antialiased edges (and maybe shadows) if a
> composite manager is running.
We've already started seeing conventions that indicate when a
compositing manager is running; having applications not shape their
windows in this case would be more efficient than having the computed
shape be ignored.
> All current ideas to implement window previews in a taskbar rely on some kind
> of communication of the taskbar with the composite manager. My idea is to
> provide a more flexible system directly in the composite extension that could
> also work without a running composite manager.
Automatic redirection does precisely this already.
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the xorg