[PATCH weston v6 39/73] libweston: remove weston_output::head
Pekka Paalanen
ppaalanen at gmail.com
Fri Feb 16 14:57:24 UTC 2018
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Remove the scaffolding that allowed backends to be converted one by one
to the head-based API. Nothing is using these members anymore.
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
libweston/compositor.c | 36 +++---------------------------------
libweston/compositor.h | 3 ---
2 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 311ea96e..9a8b90f5 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -5446,13 +5446,6 @@ weston_output_init(struct weston_output *output,
wl_list_init(&output->head_list);
- weston_head_init(&output->head, name);
- output->head.allocator_output = output;
- if (!compositor->backend->create_output) {
- weston_head_set_connection_status(&output->head, true);
- weston_compositor_add_head(compositor, &output->head);
- }
-
/* Add some (in)sane defaults which can be used
* for checking if an output was properly configured
*/
@@ -5689,8 +5682,6 @@ weston_output_release(struct weston_output *output)
wl_list_for_each_safe(head, tmp, &output->head_list, output_link)
weston_head_detach(head);
- weston_head_release(&output->head);
-
free(output->name);
}
@@ -5714,22 +5705,13 @@ weston_compositor_create_output_with_head(struct weston_compositor *compositor,
{
struct weston_output *output;
- if (head->allocator_output) {
- /* XXX: compatibility path to be removed after all converted */
- output = head->allocator_output;
- } else {
- assert(compositor->backend->create_output);
- output = compositor->backend->create_output(compositor,
- head->name);
- }
-
+ assert(compositor->backend->create_output);
+ output = compositor->backend->create_output(compositor, head->name);
if (!output)
return NULL;
if (weston_output_attach_head(output, head) < 0) {
- if (!head->allocator_output)
- output->destroy(output);
-
+ weston_output_destroy(output);
return NULL;
}
@@ -5751,18 +5733,6 @@ weston_compositor_create_output_with_head(struct weston_compositor *compositor,
WL_EXPORT void
weston_output_destroy(struct weston_output *output)
{
- struct weston_head *head;
-
- /* XXX: compatibility path to be removed after all converted */
- head = weston_output_get_first_head(output);
- if (head->allocator_output) {
- /* The old design: backend is responsible for destroying the
- * output, so just undo create_output_with_head()
- */
- weston_head_detach(head);
- return;
- }
-
output->destroy(output);
}
diff --git a/libweston/compositor.h b/libweston/compositor.h
index 31e94c61..b67f03fa 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -174,8 +174,6 @@ struct weston_head {
char *name; /**< head name, e.g. connector name */
bool connected; /**< is physically connected */
-
- struct weston_output *allocator_output; /**< XXX: to be removed */
};
struct weston_output {
@@ -240,7 +238,6 @@ struct weston_output {
struct weston_mode *original_mode;
struct wl_list mode_list;
- struct weston_head head; /**< head for unconverted backends */
struct wl_list head_list; /**< List of driven weston_heads */
void (*start_repaint_loop)(struct weston_output *output);
--
2.13.6
More information about the wayland-devel
mailing list