mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
wayland/actor-surface: Always set opaque region on alpha-less textures
Wayland clients using buffers without alpha channel are not expected to set an opaque region. However, we rely on the opaque region for the fast painting path in `MetaShapedTexture`. Thus, make sure to always set an opaque region internally in those cases. For X11 clients, wo do so already. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1463
This commit is contained in:
parent
64d34a7648
commit
71f03a718d
@ -225,7 +225,15 @@ meta_wayland_actor_surface_real_sync_actor_state (MetaWaylandActorSurface *actor
|
||||
|
||||
if (!META_IS_XWAYLAND_SURFACE (surface_role))
|
||||
{
|
||||
if (surface->opaque_region)
|
||||
if (!meta_shaped_texture_has_alpha (stex))
|
||||
{
|
||||
cairo_region_t *opaque_region;
|
||||
|
||||
opaque_region = cairo_region_create_rectangle (&surface_rect);
|
||||
meta_surface_actor_set_opaque_region (surface_actor, opaque_region);
|
||||
cairo_region_destroy (opaque_region);
|
||||
}
|
||||
else if (surface->opaque_region)
|
||||
{
|
||||
cairo_region_t *opaque_region;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user