[mutter/gnome-3-34] renderer-native: Fix memory leak in secondary GPU update



commit 59e9b073a5bf7bb7eb332b680c573a27bd019249
Author: Adam Jackson <ajax redhat com>
Date:   Fri Jan 17 16:28:48 2020 +0000

    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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]