libweston: remove weston_output::head

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@collabora.co.uk>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
dev
Pekka Paalanen 7 years ago
parent c112f00bd1
commit 42c0e14808
  1. 36
      libweston/compositor.c
  2. 3
      libweston/compositor.h

@ -5449,13 +5449,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
*/
@ -5692,8 +5685,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);
}
@ -5717,22 +5708,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;
}
@ -5754,18 +5736,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);
}

@ -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);

Loading…
Cancel
Save