wl_surface/wl_subsurface composition

Scott Anderson scott.anderson at collabora.com
Wed Dec 11 08:15:39 UTC 2019


On 11/12/19 8:46 pm, Martin Stransky 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

The two surfaces should be blended together correctly, regardless if 
either of them have any opaque regions. They're no different to regular 
surfaces in this regard.

However, if you mark a region as opaque, it really needs to be opaque in 
the buffer, i.e. alpha is 1.0 or the format doesn't have any alpha. It's 
not something to say "please don't alpha blend this region" to the 
compositor.

The opaque region is mainly just an optimization for the compositor, so 
it knows it won't need to draw surfaces behind yours.

Scott


More information about the wayland-devel mailing list