[PATCH 2/2] compositor: add a masking mechanism to weston_layer

Bill Spitzak spitzak at gmail.com
Wed Jan 29 09:42:51 PST 2014


I believe what he is trying to achieve is this display of two "desktops" 
on the same screen, such as for previewing desktop switching, or perhaps 
for an intermediate state of a "swipe" from one desktop to another:

    +--------------+ +---------------+
    |         +----| |               |
    |         |  A | |-----+         |
    |         +----| |  B  |         |
    |              | |-----+         |
    +--------------+ +---------------+
         DESK 1            DESK 2

The surfaces A and B are both large enough that if unclipped they would 
enter the area of the other desktop.

This can't be done by putting a mask into the view stack.

However I disagree with exposing the layers for this. First of all these 
are not layers, both desktops are in effect at the same layer. And it 
makes no sense for a lower layer (for normal use of layers) to not be 
clipped by the same clip as a higher layer.

I think this could be solved by adding a clip to each view. This would 
be a pixel-aligned rectangle in output space, though perhaps the object 
should be designed so it can be expanded to more complex clips in the 
future.

On 01/29/2014 04:28 AM, Ander Conselvan de Oliveira wrote:

>>>> this adds a mechanism to mask the views belonging to a layer
>>>> to an arbitrary rect, in the global space. The parts that don't fit
>>>> in that rect will be clipped away.




More information about the wayland-devel mailing list