[Mesa-dev] [PATCH 2/4] egl: implement EGL_KHR_gl_colorspace (v2)

Emil Velikov emil.l.velikov at gmail.com
Thu Jul 16 05:57:33 PDT 2015


On 12 July 2015 at 20:10, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> v2: add missing "break"

> --- a/src/egl/drivers/dri2/egl_dri2.h
> +++ b/src/egl/drivers/dri2/egl_dri2.h
> @@ -285,6 +285,8 @@ struct dri2_egl_config
>     _EGLConfig         base;
>     const __DRIconfig *dri_single_config;
>     const __DRIconfig *dri_double_config;
> +   const __DRIconfig *dri_srgb_single_config;
> +   const __DRIconfig *dri_srgb_double_config;
Nitpick: If you change the current configs to two-sized arrays, one
will be able simplify the conditionals.
So common things like

        if (srgb)
           conf->dri_srgb_single_config = dri_config;
        else
           conf->dri_single_config = dri_config;

will become

        conf->dri_srgb_single_config[srgb] = dri_config;


> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c

> @@ -230,6 +231,9 @@ droid_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
>        window->query(window, NATIVE_WINDOW_HEIGHT, &dri2_surf->base.Height);
>     }
>
> +   config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
> +                                dri2_surf->base.GLColorspace);
> +
>     dri2_surf->dri_drawable =
>        (*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen,
>                                            dri2_conf->dri_double_config,
Please use the new config in the above call.

Thanks sorting out the android platform !

Emil


More information about the mesa-dev mailing list