[Mesa-dev] [PATCH mesa 11/12] egl: remove wayland special case which is also the default case

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 30 11:57:16 UTC 2018


On Mon, 29 Oct 2018 at 17:16, Eric Engestrom <eric.engestrom at intel.com> wrote:
>
> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
> ---
>  src/egl/drivers/dri2/egl_dri2.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index c5fa935657e8165be49c..7d9e24d79ddf833802fb 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -99,10 +99,9 @@ dri2_gl_flush()
>  static GLboolean
>  dri_is_thread_safe(void *loaderPrivate)
>  {
> +#ifdef HAVE_X11_PLATFORM
>     struct dri2_egl_surface *dri2_surf = loaderPrivate;
>     _EGLDisplay *display =  dri2_surf->base.Resource.Display;
> -
> -#ifdef HAVE_X11_PLATFORM
>     Display *xdpy = (Display*)display->PlatformDisplay;
>
>     /* Check Xlib is running in thread safe mode when running on EGL/X11-xlib
> @@ -115,11 +114,6 @@ dri_is_thread_safe(void *loaderPrivate)
>        return false;
>  #endif
>
> -#ifdef HAVE_WAYLAND_PLATFORM
> -   if (display->Platform == _EGL_PLATFORM_WAYLAND)
> -      return true;
> -#endif
> -
I believe the idea was to make it clearer that Wayland is thread safe,
while pointing out that other platforms are _not_ checked and/or safe.
Personally, I'd split between a) applying this patch or b) returning
false + big fat warning message for the platforms not explicitly
handled.

Daniel, considering you've asked for the explicit Wayland hunk I'd
leave the call to you.

-Emil


More information about the mesa-dev mailing list