mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
subsurface: Don't create a bg_subsurface until we need it
There's a ton of error checking happening that we want to do. Because it turns out it is not really useful to create a subsurface for the single pixel buffer when we don't even support single pixel buffers.
This commit is contained in:
parent
3cd25516ab
commit
a7b69ad9b5
@ -491,9 +491,6 @@ gdk_wayland_subsurface_attach (GdkSubsurface *sub,
|
||||
|
||||
has_background = self->bg_rect.width > 0 && self->bg_rect.height > 0;
|
||||
|
||||
if (has_background)
|
||||
ensure_bg_surface (self);
|
||||
|
||||
if (!scaled_rect_is_integral (dest, 1, &device_rect))
|
||||
{
|
||||
GDK_DISPLAY_DEBUG (gdk_surface_get_display (sub->parent), OFFLOAD,
|
||||
@ -669,6 +666,8 @@ gdk_wayland_subsurface_attach (GdkSubsurface *sub,
|
||||
|
||||
if (has_background)
|
||||
{
|
||||
ensure_bg_surface (self);
|
||||
|
||||
if (background_changed)
|
||||
{
|
||||
wl_subsurface_set_position (self->bg_subsurface, self->bg_rect.x, self->bg_rect.y);
|
||||
|
Loading…
Reference in New Issue
Block a user