EXT: [PATCH weston v6 25/73] libweston: change windowed_output_api output_create to create_head
Ray, Ian (GE Healthcare)
ian.ray at ge.com
Fri Mar 23 13:42:30 UTC 2018
> On 23 Mar 2018, at 15.36, Ray, Ian (GE Healthcare) <ian.ray at ge.com> wrote:
>
>>
>> On 16 Feb 2018, at 16.57, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>>
>> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>>
>> Rename the function pointer to create_head() because that is what it
>> does on backends that are converted to the head-based API. Update the
>> documentation to match.
>>
>> Surprisingly this is not an ABI break, as the function behaviour and
>> signature remain intact. Hence API_NAME is not bumped.
>>
>> This is only an API break, and main.c is fixed accordingly.
>>
>
> Nit: it’s not an API break, it’s a rename.
Apologies, I misread. Strictly it is indeed an ‘API break’
though I’d call it a rename ;)
>
>
>> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>> ---
>> compositor/main.c | 10 +++++-----
>> libweston/windowed-output-api.h | 23 +++++++++++++----------
>> 2 files changed, 18 insertions(+), 15 deletions(-)
>>
>> diff --git a/compositor/main.c b/compositor/main.c
>> index 12d54083..61587870 100644
>> --- a/compositor/main.c
>> +++ b/compositor/main.c
>> @@ -1372,7 +1372,7 @@ load_headless_backend(struct weston_compositor *c,
>> return -1;
>> }
>>
>> - if (api->output_create(c, "headless") < 0)
>> + if (api->create_head(c, "headless") < 0)
>> return -1;
>> }
>>
>> @@ -1600,7 +1600,7 @@ load_x11_backend(struct weston_compositor *c,
>> continue;
>> }
>>
>> - if (api->output_create(c, output_name) < 0) {
>> + if (api->create_head(c, output_name) < 0) {
>> free(output_name);
>> return -1;
>> }
>> @@ -1616,7 +1616,7 @@ load_x11_backend(struct weston_compositor *c,
>> return -1;
>> }
>>
>> - if (api->output_create(c, default_output) < 0) {
>> + if (api->create_head(c, default_output) < 0) {
>> free(default_output);
>> return -1;
>> }
>> @@ -1732,7 +1732,7 @@ load_wayland_backend(struct weston_compositor *c,
>> continue;
>> }
>>
>> - if (api->output_create(c, output_name) < 0) {
>> + if (api->create_head(c, output_name) < 0) {
>> free(output_name);
>> return -1;
>> }
>> @@ -1745,7 +1745,7 @@ load_wayland_backend(struct weston_compositor *c,
>> if (asprintf(&output_name, "wayland%d", i) < 0)
>> return -1;
>>
>> - if (api->output_create(c, output_name) < 0) {
>> + if (api->create_head(c, output_name) < 0) {
>> free(output_name);
>> return -1;
>> }
>> diff --git a/libweston/windowed-output-api.h b/libweston/windowed-output-api.h
>> index e0f78b4d..388413f3 100644
>> --- a/libweston/windowed-output-api.h
>> +++ b/libweston/windowed-output-api.h
>> @@ -56,23 +56,26 @@ struct weston_windowed_output_api {
>> int (*output_set_size)(struct weston_output *output,
>> int width, int height);
>>
>> - /** Create a new windowed output.
>> + /** Create a new windowed head.
>> *
>> * \param compositor The compositor instance.
>> - * \param name Desired name for a new output.
>> + * \param name Desired name for a new head, not NULL.
>> *
>> * Returns 0 on success, -1 on failure.
>> *
>> - * This creates a new output in the backend using this API.
>> - * After this function is ran, the created output should be
>> - * ready for configuration using the output_configure() and
>> - * weston_output_set_{scale,transform}().
>> + * This creates a new head in the backend. The new head will
>> + * be advertised in the compositor's head list and triggers a
>> + * head_changed callback.
>> *
>> - * An optional name can be assigned to it, so it can be used
>> - * by compositor to configure it. It can't be NULL.
>> + * A new output can be created for the head. The output must be
>> + * configured with output_set_size() and
>> + * weston_output_set_{scale,transform}() before enabling it.
>> + *
>> + * \sa weston_compositor_set_heads_changed_cb(),
>> + * weston_compositor_create_output_with_head()
>> */
>> - int (*output_create)(struct weston_compositor *compositor,
>> - const char *name);
>> + int (*create_head)(struct weston_compositor *compositor,
>> + const char *name);
>> };
>>
>> static inline const struct weston_windowed_output_api *
>> --
>> 2.13.6
>>
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list