backends: don't destroy renderer and output twice
drm, fbdev, rpi and wayland backends are unnecessarily destroying renderer and output before executing weston_compositor_shutdown() Signed-off-by: Dawid Gajownik <gajownik@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
405ae2feba
commit
82d4925b1a
@ -3165,7 +3165,6 @@ err_drm_source:
|
||||
err_udev_input:
|
||||
udev_input_destroy(&b->input);
|
||||
err_sprite:
|
||||
compositor->renderer->destroy(compositor);
|
||||
gbm_device_destroy(b->gbm);
|
||||
destroy_sprites(b);
|
||||
err_udev_dev:
|
||||
|
@ -881,16 +881,13 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
|
||||
}
|
||||
|
||||
if (fbdev_output_create(backend, param->device) < 0)
|
||||
goto out_pixman;
|
||||
goto out_launcher;
|
||||
|
||||
udev_input_init(&backend->input, compositor, backend->udev, seat_id);
|
||||
|
||||
compositor->backend = &backend->base;
|
||||
return backend;
|
||||
|
||||
out_pixman:
|
||||
compositor->renderer->destroy(compositor);
|
||||
|
||||
out_launcher:
|
||||
weston_launcher_destroy(compositor->launcher);
|
||||
|
||||
|
@ -522,20 +522,17 @@ rpi_backend_create(struct weston_compositor *compositor,
|
||||
goto out_launcher;
|
||||
|
||||
if (rpi_output_create(backend, param->output_transform) < 0)
|
||||
goto out_renderer;
|
||||
goto out_launcher;
|
||||
|
||||
if (udev_input_init(&backend->input,
|
||||
compositor,
|
||||
backend->udev, "seat0") != 0) {
|
||||
weston_log("Failed to initialize udev input.\n");
|
||||
goto out_renderer;
|
||||
goto out_launcher;
|
||||
}
|
||||
|
||||
return backend;
|
||||
|
||||
out_renderer:
|
||||
compositor->renderer->destroy(compositor);
|
||||
|
||||
out_launcher:
|
||||
weston_launcher_destroy(compositor->launcher);
|
||||
|
||||
|
@ -2018,14 +2018,12 @@ wayland_backend_create(struct weston_compositor *compositor, int use_pixman,
|
||||
wl_event_loop_add_fd(loop, fd, WL_EVENT_READABLE,
|
||||
wayland_backend_handle_event, b);
|
||||
if (b->parent.wl_source == NULL)
|
||||
goto err_renderer;
|
||||
goto err_display;
|
||||
|
||||
wl_event_source_check(b->parent.wl_source);
|
||||
|
||||
compositor->backend = &b->base;
|
||||
return b;
|
||||
err_renderer:
|
||||
compositor->renderer->destroy(compositor);
|
||||
err_display:
|
||||
wl_display_disconnect(b->parent.wl_display);
|
||||
err_compositor:
|
||||
@ -2037,12 +2035,6 @@ err_compositor:
|
||||
static void
|
||||
wayland_backend_destroy(struct wayland_backend *b)
|
||||
{
|
||||
struct weston_output *output, *next;
|
||||
|
||||
wl_list_for_each_safe(output, next, &b->compositor->output_list, link)
|
||||
wayland_output_destroy(output);
|
||||
|
||||
b->compositor->renderer->destroy(b->compositor);
|
||||
wl_display_disconnect(b->parent.wl_display);
|
||||
|
||||
if (b->theme)
|
||||
|
Loading…
x
Reference in New Issue
Block a user