[compiz] Greetings, first remarks about trying to do customizable drop-shadows

David Reveman davidr at novell.com
Mon Apr 3 10:54:02 PDT 2006


On Mon, 2006-04-03 at 19:01 +0200, Mirco Müller wrote: 
> Am Montag, den 03.04.2006, 14:14 +0200 schrieb David Reveman:
> 
> > I assume that you want to put this code in compiz as a plugin. I suggest
> > not doing that. I've implemented drop-shadows like that before and it's
> > not a good solution. I strongly believe that drop shadows as part of the
> > decorations is currently the best solution. Like gnome-window-decorator
> > is doing but they should be made fully tweakable, of course.
> > 
> > Read the section about drop-shadows in the following post, if you
> > haven't already. 
> > 
> > http://lists.freedesktop.org/archives/compiz/2006-April/000009.html
> 
> Ok read the stuff.
> 
> 	Sure I'll did not intend to do a seperate on-the-fly
> drop-shadow-drawing plugin. I'm currently going for tweakable static
> drop-shadows for simple (read: rectangular) window shapes in g-w-d. I'm
> well aware of the fact, that fully dynamic arbitrary shadows done by
> convolutions executed on the GPU are a very costly luxury
> (performance-wise), which also narrow down the possible target-audience
> considerably. Aside from that I'm not that fluent in GLSL or
> shader-assembly yet to code a gaussian-blur filter top-down in no time.
> Still it's nice to know that it's technically possible... getting a
> windows alpha-mask via XShape (according to tommie-lie) and a
> fragment-shader for the blurring.

yes, I don't think it's worth the time to do this today.

> 
> 	So right now I want to have a single set of 9 small textures with the
> different drop-shadow-parts that gets generated at start-time of compiz
> (or whenever gnome-window-decorator initially runs its setup functions),
> according to some tweakable parameters set via gconf by the user... or
> maybe later by one of the recently emerging graphical
> compiz-configuration-frontends.

You definitely don't want 9 small textures for this. You can easily do
it with one small texture that just contains a quarter of a circle by
assigning texture coordinates correctly. However, this is not what we
want. I've done this, trust me :) 

Shadows as part of the decorations is most efficient. It only makes
sense to do static shadows on rectangular windows and windows with
decorations. We can't do usable shadows on ARGB windows and it's not
worth doing any shadows on windows that use the shape extension. ARGB
windows should do their own shadows and that's why I suggested a
drop-shadow library and some root window properties to keep the shadow
look consistent among applications.

-David



More information about the compiz mailing list