mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
wayland: Refuse offloading when we can't
If we have a subsurface with background, but no single-pixel buffer support, refuse to offload.
This commit is contained in:
parent
0c67b367ac
commit
fbe000734a
@ -311,6 +311,7 @@ gdk_wayland_subsurface_attach (GdkSubsurface *sub,
|
||||
{
|
||||
GdkWaylandSubsurface *self = GDK_WAYLAND_SUBSURFACE (sub);
|
||||
GdkWaylandSurface *parent = GDK_WAYLAND_SURFACE (sub->parent);
|
||||
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (sub->parent));
|
||||
struct wl_buffer *buffer = NULL;
|
||||
gboolean result = FALSE;
|
||||
GdkWaylandSubsurface *sib = sibling ? GDK_WAYLAND_SUBSURFACE (sibling) : NULL;
|
||||
@ -457,6 +458,12 @@ gdk_wayland_subsurface_attach (GdkSubsurface *sub,
|
||||
gdk_texture_get_height (texture),
|
||||
self);
|
||||
}
|
||||
else if (has_background && !display->single_pixel_buffer)
|
||||
{
|
||||
GDK_DISPLAY_DEBUG (gdk_surface_get_display (sub->parent), OFFLOAD,
|
||||
"Cannot offload subsurface %p with background, no single-pixel buffer support",
|
||||
self);
|
||||
}
|
||||
else
|
||||
{
|
||||
gboolean was_transparent;
|
||||
|
Loading…
Reference in New Issue
Block a user