libweston: Rename weston_surface_destroy() to weston_surface_unref()

Make it obvious that weston_surface has a reference counting happening
and destruction of the weston_surface happens when the last
weston_surface reference has been accounted for.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad
2022-02-07 10:59:41 +02:00
parent 53a221ccaa
commit 0d8e94af61
6 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -192,7 +192,7 @@ weston_curtain_create(struct weston_compositor *compositor,
err_view:
weston_view_destroy(view);
err_surface:
weston_surface_destroy(surface);
weston_surface_unref(surface);
err_curtain:
free(curtain);
err:
@@ -206,7 +206,7 @@ weston_curtain_destroy(struct weston_curtain *curtain)
struct weston_surface *surface = curtain->view->surface;
weston_view_destroy(curtain->view);
weston_surface_destroy(surface);
weston_surface_unref(surface);
weston_buffer_destroy_solid(curtain->buffer_ref);
free(curtain);
}