Some ideas how XComposite could be improved
onestone at opencompositing.org
Mon Nov 19 21:01:55 PST 2007
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.
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.
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. It could be also used for
other thing and not only for taskbar previews. The composite extension could
provide a "passive redirect" system. Each application could request a passive
redirect of a window. If the window is already redirected by a composite
manager, then only a passive redirect counter would be incremented, and the
application could use the window pixmap (XCompositeNameWindowPixmap). If the
window is not redirected, then the xserver would redirect it, but would then
still blit the pixmap contents to the screen (Isn't the backing store already
doing something like this?). The only one problem I have with this idea is,
that I don't know how unmapped windows could be handled here.
I hope that not everything I wrote is absolutely wrong and it would be nice to
get some replies.
More information about the xorg