wayland: Fix an offload cornercase

Treat textures with background as opaque for the purposes of
offloading.
This commit is contained in:
Matthias Clasen 2024-04-21 11:54:57 -04:00
parent 2d8f677e63
commit 4b0d17b332

View File

@ -450,7 +450,8 @@ gdk_wayland_subsurface_attach (GdkSubsurface *sub,
self);
}
else if (!will_be_above &&
gdk_memory_format_alpha (gdk_texture_get_format (texture)) != GDK_MEMORY_ALPHA_OPAQUE)
gdk_memory_format_alpha (gdk_texture_get_format (texture)) != GDK_MEMORY_ALPHA_OPAQUE &&
!has_background)
{
GDK_DISPLAY_DEBUG (gdk_surface_get_display (sub->parent), OFFLOAD,
"Cannot offload non-opaque %dx%d texture below, hiding subsurface %p",