renderer/native: Destory EGL context on GPU data tear down

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1822>
This commit is contained in:
Jonas Ådahl 2021-04-13 15:46:05 +02:00 committed by Marge Bot
parent 63d969537f
commit d077baadbb

View File

@ -115,6 +115,14 @@ meta_renderer_native_gpu_data_free (MetaRendererNativeGpuData *renderer_gpu_data
MetaRendererNative *renderer_native = renderer_gpu_data->renderer_native; MetaRendererNative *renderer_native = renderer_gpu_data->renderer_native;
MetaEgl *egl = meta_renderer_native_get_egl (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) if (renderer_gpu_data->egl_display != EGL_NO_DISPLAY)
meta_egl_terminate (egl, renderer_gpu_data->egl_display, NULL); meta_egl_terminate (egl, renderer_gpu_data->egl_display, NULL);