[Mesa-dev] [PATCH 07/18] egl/wayland: Use visual map for buffer_from_image
Emil Velikov
emil.l.velikov at gmail.com
Thu Feb 8 22:00:40 UTC 2018
On 8 February 2018 at 13:55, Daniel Stone <daniels at collabora.com> wrote:
> When creating a wl_buffer on an upstream Wayland display from an
> existing EGLImage, use the dri2_wl_visual map rather than another
> hardcoded list of formats.
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
> src/egl/drivers/dri2/platform_wayland.c | 38 ++++++++++++++++-----------------
> 1 file changed, 18 insertions(+), 20 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> index 1eac2158ac2..0839f5e85a7 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -130,6 +130,17 @@ dri2_wl_visual_idx_from_config(struct dri2_egl_display *dri2_dpy,
> return -1;
> }
>
> +static int
> +dri2_wl_visual_idx_from_dri_image_format(uint32_t dri_image_format)
> +{
> + for (int i = 0; i < ARRAY_SIZE(dri2_wl_visuals); i++) {
Nit: s/int i/unsigned i/
Please don't resend, if you agree.
-Emil
More information about the mesa-dev
mailing list