From 401e190913610aa004751315edb3956bc4098d37 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 9 Apr 2021 17:26:30 +0300 Subject: [PATCH] Revert "gl-renderer: Make dummy surface current after all outputs are gone" This reverts commit 36d699a16415307de3c5a77ff89567b79595f970. A different way to fix this same issue is the previous commit "gl-renderer: do not unbind the context on output destroy" which is needed for other reasons. Signed-off-by: Pekka Paalanen --- libweston/renderer-gl/gl-renderer-internal.h | 2 -- libweston/renderer-gl/gl-renderer.c | 20 -------------------- 2 files changed, 22 deletions(-) diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h index 35203dd3..3a262b74 100644 --- a/libweston/renderer-gl/gl-renderer-internal.h +++ b/libweston/renderer-gl/gl-renderer-internal.h @@ -147,8 +147,6 @@ struct gl_renderer { struct wl_signal destroy_signal; - struct wl_listener output_destroy_listener; - bool has_dmabuf_import_modifiers; PFNEGLQUERYDMABUFFORMATSEXTPROC query_dmabuf_formats; PFNEGLQUERYDMABUFMODIFIERSEXTPROC query_dmabuf_modifiers; diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 050398fc..0c65f652 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -3514,8 +3514,6 @@ gl_renderer_destroy(struct weston_compositor *ec) eglTerminate(gr->egl_display); eglReleaseThread(); - wl_list_remove(&gr->output_destroy_listener.link); - wl_array_release(&gr->vertices); wl_array_release(&gr->vtxcnt); @@ -3528,20 +3526,6 @@ gl_renderer_destroy(struct weston_compositor *ec) free(gr); } -static void -output_handle_destroy(struct wl_listener *listener, void *data) -{ - struct gl_renderer *gr; - struct weston_output *output = data; - - gr = container_of(listener, struct gl_renderer, - output_destroy_listener); - - if (wl_list_empty(&output->compositor->output_list)) - eglMakeCurrent(gr->egl_display, gr->dummy_surface, - gr->dummy_surface, gr->egl_context); -} - static int gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) { EGLConfig pbuffer_config; @@ -3869,10 +3853,6 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface) fan_debug_repaint_binding, ec); - gr->output_destroy_listener.notify = output_handle_destroy; - wl_signal_add(&ec->output_destroyed_signal, - &gr->output_destroy_listener); - weston_log("GL ES %d.%d - renderer features:\n", gr_gl_version_major(gr->gl_version), gr_gl_version_minor(gr->gl_version));