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:
committed by
Matthias Clasen
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;
|
||||
|
||||
Reference in New Issue
Block a user