From d077baadbb4489cdb82beef0327bff67ebde1c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 13 Apr 2021 15:46:05 +0200 Subject: [PATCH] renderer/native: Destory EGL context on GPU data tear down Part-of: --- src/backends/native/meta-renderer-native.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c index 9898b9f64..f12e2dda7 100644 --- a/src/backends/native/meta-renderer-native.c +++ b/src/backends/native/meta-renderer-native.c @@ -115,6 +115,14 @@ meta_renderer_native_gpu_data_free (MetaRendererNativeGpuData *renderer_gpu_data MetaRendererNative *renderer_native = renderer_gpu_data->renderer_native; MetaEgl *egl = meta_renderer_native_get_egl (renderer_native); + if (renderer_gpu_data->secondary.egl_context != EGL_NO_CONTEXT) + { + meta_egl_destroy_context (egl, + renderer_gpu_data->egl_display, + renderer_gpu_data->secondary.egl_context, + NULL); + } + if (renderer_gpu_data->egl_display != EGL_NO_DISPLAY) meta_egl_terminate (egl, renderer_gpu_data->egl_display, NULL);