Unresponsive applications

Sam Spilsbury smspillaz at gmail.com
Thu Sep 22 19:47:26 PDT 2011

On Fri, Sep 23, 2011 at 6:33 AM, Bill Spitzak <spitzak at gmail.com> wrote:
> 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.

I won't weigh in in this discussion any further as this topic has been
discussed to death, but I do want to clarify this - Windows does use
compositor generated backgrounds and merely allows the client to
specify which parts they will override drawing and where the client
drawing in the frame should start [1]. I'm not going to comment on
whether or not that's better solution than CSD because I do not wish
to get involved in the debate, but I do wish to clarify that.

[1] http://msdn.microsoft.com/en-us/library/ms748975.aspx

> 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
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Sam Spilsbury

More information about the wayland-devel mailing list