compositor: Move unbind_display call into gles2-renderer.c
This commit is contained in:
parent
9793fc7a4e
commit
3a0de88abf
@ -423,6 +423,8 @@ android_init_egl(struct android_compositor *compositor,
|
||||
static void
|
||||
android_fini_egl(struct android_compositor *compositor)
|
||||
{
|
||||
gles2_renderer_destroy(&compositor->base);
|
||||
|
||||
eglMakeCurrent(compositor->base.egl_display,
|
||||
EGL_NO_SURFACE, EGL_NO_SURFACE,
|
||||
EGL_NO_CONTEXT);
|
||||
|
@ -2034,6 +2034,8 @@ drm_destroy(struct weston_compositor *ec)
|
||||
|
||||
weston_compositor_shutdown(ec);
|
||||
|
||||
gles2_renderer_destroy(ec);
|
||||
|
||||
/* Work around crash in egl_dri2.c's dri2_make_current() */
|
||||
eglMakeCurrent(ec->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
|
||||
EGL_NO_CONTEXT);
|
||||
|
@ -797,6 +797,8 @@ wayland_restore(struct weston_compositor *ec)
|
||||
static void
|
||||
wayland_destroy(struct weston_compositor *ec)
|
||||
{
|
||||
gles2_renderer_destroy(ec);
|
||||
|
||||
weston_compositor_shutdown(ec);
|
||||
|
||||
free(ec);
|
||||
|
@ -273,6 +273,8 @@ x11_compositor_init_egl(struct x11_compositor *c)
|
||||
static void
|
||||
x11_compositor_fini_egl(struct x11_compositor *compositor)
|
||||
{
|
||||
gles2_renderer_destroy(&compositor->base);
|
||||
|
||||
eglMakeCurrent(compositor->base.egl_display,
|
||||
EGL_NO_SURFACE, EGL_NO_SURFACE,
|
||||
EGL_NO_CONTEXT);
|
||||
|
@ -3142,9 +3142,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
wl_signal_emit(&ec->destroy_signal, ec);
|
||||
|
||||
if (ec->has_bind_display)
|
||||
ec->unbind_display(ec->egl_display, display);
|
||||
|
||||
for (i = ARRAY_LENGTH(signals); i;)
|
||||
wl_event_source_remove(signals[--i]);
|
||||
|
||||
|
@ -803,5 +803,7 @@ weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode
|
||||
|
||||
int
|
||||
gles2_renderer_init(struct weston_compositor *ec);
|
||||
void
|
||||
gles2_renderer_destroy(struct weston_compositor *ec);
|
||||
|
||||
#endif
|
||||
|
@ -1039,6 +1039,13 @@ struct gles2_renderer {
|
||||
struct weston_renderer base;
|
||||
};
|
||||
|
||||
WL_EXPORT void
|
||||
gles2_renderer_destroy(struct weston_compositor *ec)
|
||||
{
|
||||
if (ec->has_bind_display)
|
||||
ec->unbind_display(ec->egl_display, ec->wl_display);
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
gles2_renderer_init(struct weston_compositor *ec)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user