Stacking subsurface siblings

Jasper St. Pierre jstpierre at mecheye.net
Tue Jun 16 08:36:36 PDT 2015


I was imagining that this was a fullscreen mode, given that you had no
UI stacked under the video.

The thing about surfaces is that you can configure them as you like
every frame. If you have a browser playing multiple videos, each video
can be a subsurface, and then when you transition to a fullscreen
playback with OSD, you can reconfigure your main surface to be playing
the video, and add a single OSD subsurface on top in the right
location.

Your main surface can transition between being a UI layer and a video
layer when it's needed.

On Tue, Jun 16, 2015 at 8:31 AM, Arnaud Vrac <rawoul at gmail.com> wrote:
> It's possible, but the OSD is usually longer lived than the video surfaces,
> which might be transient. For example in an HTML browser, a declarative UI,
> etc, multiple video surfaces could be created for some pages and then
> destroyed when the page is closed.
>
> On Tue, Jun 16, 2015 at 5:11 PM, Jasper St. Pierre <jstpierre at mecheye.net>
> wrote:
>>
>> Why can't you use the video as the main surface and an OSD as a
>> subsurface?
>>
>> On Tue, Jun 16, 2015 at 11:09 AM, Arnaud Vrac <rawoul at gmail.com> wrote:
>> > I'm not sure, but I find it very useful for a video player. The video is
>> > stacked under the OSD and to be able to use hardware planes, the only
>> > viable
>> > option with wayland is to have a surface for the OSD and a subsurface
>> > for
>> > the video which is stacked under.
>> >
>> > On Tue, Jun 16, 2015 at 5:02 PM, Jasper St. Pierre
>> > <jstpierre at mecheye.net>
>> > wrote:
>> >>
>> >> I was not aware you could stack subsurfaces under a parent surface at
>> >> all. Is this intended protocol behavior? The fact that you might be
>> >> able to do that at all in Weston might be a bug.
>> >>
>> >> On Tue, Jun 16, 2015 at 7:46 AM, Arnaud Vrac <rawoul at gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > I'm wondering if a behaviour of weston related to subsurfaces is
>> >> > either
>> >> > a
>> >> > bug or intended. The protocol description is not clear on what
>> >> > happens
>> >> > in
>> >> > the following cases:
>> >> >
>> >> > Suppose I have a shell surface (BLUE) and two subsurfaces (RED,
>> >> > GREEN).
>> >> > I
>> >> > want to stack them to I get RED, GREEN, BLUE from bottom to top.
>> >> >
>> >> > If I do:
>> >> >
>> >> > wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);
>> >> > wl_subsurface_place_below(RED->subsurface, GREEN->surface);
>> >> >
>> >> > It works, but if I do:
>> >> >
>> >> > wl_subsurface_place_below(RED->subsurface, GREEN->surface);
>> >> > wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);
>> >> >
>> >> > The order is GREEN, RED, BLUE instead.
>> >> >
>> >> > Logically the sibling relative order should be kept in the second
>> >> > case,
>> >> > but
>> >> > it's not. The protocol is not clear on what should happen, what is
>> >> > the
>> >> > expected result ?
>> >> >
>> >> > I have attached a small sample to test easily.
>> >> >
>> >> > --
>> >> > Arnaud
>> >> >
>> >> > _______________________________________________
>> >> > wayland-devel mailing list
>> >> > wayland-devel at lists.freedesktop.org
>> >> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >>   Jasper
>> >
>> >
>> >
>> >
>> > --
>> > Arnaud Vrac
>>
>>
>>
>> --
>>   Jasper
>
>
>
>
> --
> Arnaud Vrac



-- 
  Jasper


More information about the wayland-devel mailing list