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
@@ -2352,7 +2352,7 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
fade_out_done, shsurf);
return;
} else {
weston_surface_destroy(surface);
weston_surface_unref(surface);
}
}
@@ -4830,7 +4830,7 @@ desktop_shell_destroy_views_on_layer(struct weston_layer *layer)
if (shsurf)
desktop_shell_destroy_surface(shsurf);
else if (is_black_surface_view(view, NULL))
weston_surface_destroy(view->surface);
weston_surface_unref(view->surface);
}
weston_layer_fini(layer);