Unresponsive applications
Bill Spitzak
spitzak at gmail.com
Thu Sep 22 15:33:12 PDT 2011
William Swanson wrote:
> draw_compositor_frame()
> {
> foreach (window in windows) {
> copy_buffer(window.buffer, window.x, window.y, window.w, window.h);
> if (window.needs_border)
> draw_border(window.x - 8, window.y - 24, window.w + 20, window.h + 32);
> }
> }
That copied the buffer, thus all the drawing was done by the compositor,
so of course it works. What is needed is a method such that either both
draw into the same buffer or the compositor composites the two images
together.
It can be done but only by adding latency, as there will be several
round trips before a resize requested by the user produces the resized
image on the screen. Client-side decorations get rid of most of this
round trip (there may be one after the full image is done).
> * Actually, doing the Windows Vista "glass" effect requires the
> compositor to get involved with borders. The glass is not a simple
> alpha-blending trick; it actually involves blurring the contents of
> the windows underneath. The compositor is the only one who can perform
> the blur, since it is the only process with access to the
> partially-composited desktop on each frame.
The blurry pixels do not have to be in the buffer. Instead the
compositor actually blurs them in-place on the screen (modern gpu can
certainly do this easily) and then composites the window, with partial
transparency, above it. This is in fact how Windows does this.
There is a question of how to control the blur. Blurring everything will
make non-rectangular windows sit in a blurry rectangle. The simplest
method I can think of is to blur only where there is partial
transparency. Another possibility (what Windows does) is to blur a
fixed-sized piece inside from the edges, with knowledge if there is not
a normal rectangular window there. A way for the client to have full
control is for it to make a "blur window" which the compositor does not
do an "over" to composite but it instead causes blur, and the client
keeps it directly below the normal window.
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list