From 59e9b073a5bf7bb7eb332b680c573a27bd019249 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 17 Jan 2020 16:28:48 +0000 Subject: [PATCH] renderer-native: Fix memory leak in secondary GPU update Leaking a texture object and a framebuffer object every time you update the secondary GPU is perhaps not the best plan. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1011 (cherry picked from commit 545fcb3dbff00adf1899012524926730a8c23572) --- src/backends/native/meta-renderer-native-gles3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/native/meta-renderer-native-gles3.c b/src/backends/native/meta-renderer-native-gles3.c index 740b52ef6..43394cc64 100644 --- a/src/backends/native/meta-renderer-native-gles3.c +++ b/src/backends/native/meta-renderer-native-gles3.c @@ -82,6 +82,9 @@ paint_egl_image (MetaGles3 *gles3, 0, 0, width, height, GL_COLOR_BUFFER_BIT, GL_NEAREST)); + + GLBAS (gles3, glDeleteTextures, (1, &texture)); + GLBAS (gles3, glDeleteFramebuffers, (1, &framebuffer)); } gboolean