[waffle] [PATCH 07/12] waffle: support platform-specific information
Emil Velikov
emil.l.velikov at gmail.com
Fri Jan 8 04:44:29 PST 2016
On 6 January 2016 at 21:56, Frank Henigman <fjhenigman at google.com> wrote:
> Add a platform hook so platform-specific information can be included
> by waffle_display_info_json().
>
> Signed-off-by: Frank Henigman <fjhenigman at google.com>
> ---
> src/waffle/api/waffle_display.c | 10 +++++++++-
> src/waffle/core/wcore_platform.h | 4 ++++
> 2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/src/waffle/api/waffle_display.c b/src/waffle/api/waffle_display.c
> index 7abe2ef..d6988ac 100644
> --- a/src/waffle/api/waffle_display.c
> +++ b/src/waffle/api/waffle_display.c
> @@ -367,8 +367,16 @@ waffle_display_info_json(struct waffle_display *self, bool platform_too)
>
> json_appendv(jj, "{", "generic", "{", "");
> add_generic_info(jj, wc_self->current_context);
> - json_appendv(jj, "}", "}", "");
> + json_append(jj, "}");
>
> + if (platform_too) {
> + json_appendv(jj, "platform", "{", "");
> + if (api_platform->vtbl->display.info_json)
> + api_platform->vtbl->display.info_json(wc_self, jj);
The rest of waffle tends to set UNSUPPORTED_ON_PLATFORM if the backend
is missing the vfunc.
-Emil
More information about the waffle
mailing list