mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-20 05:50:11 +00:00
Merge branch 'wip/dont-leak-egl-surface' into 'main'
gdk/surface: Don't leak the EGLSurface See merge request GNOME/gtk!7568
This commit is contained in:
commit
31b655c9eb
@ -1132,8 +1132,10 @@ gdk_surface_set_egl_native_window (GdkSurface *self,
|
||||
|
||||
if (priv->egl_surface != NULL)
|
||||
{
|
||||
GdkDisplay *display = gdk_surface_get_display (self);
|
||||
|
||||
gdk_gl_context_clear_current_if_surface (self);
|
||||
eglDestroySurface (gdk_surface_get_display (self), priv->egl_surface);
|
||||
eglDestroySurface (gdk_display_get_egl_display (display), priv->egl_surface);
|
||||
priv->egl_surface = NULL;
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "gdk/gdkglcontextprivate.h"
|
||||
|
||||
#ifdef HAVE_DMABUF
|
||||
#include <glib-unix.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user