mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
wayland: avoid dropping surfaces when possible
If the configure-event gives us the same size as we had before, which is common for animation resizes, then try to keep the existing buffer around. This saves us a memfd_create() syscall on every frame. https://bugzilla.gnome.org/show_bug.cgi?id=763350
This commit is contained in:
parent
7c2f81bcd9
commit
c48bc48dda
@ -256,6 +256,11 @@ gdk_wayland_window_update_size (GdkWindow *window,
|
||||
GdkRectangle area;
|
||||
cairo_region_t *region;
|
||||
|
||||
if ((window->width == width) &&
|
||||
(window->height == height) &&
|
||||
(impl->scale == scale))
|
||||
return;
|
||||
|
||||
drop_cairo_surfaces (window);
|
||||
|
||||
window->width = width;
|
||||
|
Loading…
Reference in New Issue
Block a user