wl_surface/wl_subsurface composition

Sebastian Krzyszkowiak dos at dosowisko.net
Wed Dec 11 08:03:51 UTC 2019


On 12/11/19, Martin Stransky <stransky at redhat.com> wrote:
> Hi guys,
>
> while solving a Firefox Wayland bug [1] I wonder if there's any
> composition between a surface and a subsurface on compositor side
> (namely mutter) when the subsurface area is subset of the surface and
> the surface is set as opaque.
>
> Both surface and subsurface are using ARGB pixel format.
>
> Thanks,
> Martin
>
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1591489#c9
>
> --
> Martin Stransky
> Software Engineer / Red Hat, Inc

Well, I haven't checked the Mutter's code, but it seems pretty obvious
to me that yes - an ARGB subsurface that isn't set as opaque still
needs to be composited on top of its parent, regardless of whether
that parent is opaque or not, as otherwise transparency wouldn't work
for subsurfaces. You want to be able to see the parent surface's
content behind non-opaque subsurface, regardless of whether the parent
itself is opaque or not.

For composition purposes, subsurfaces don't really differ much from
regular surfaces.

Cheers,
Sebastian


More information about the wayland-devel mailing list