egl: Simplify the "driver" interface
authorAdam Jackson <ajax@redhat.com>
Mon, 28 Aug 2017 15:23:58 +0000 (11:23 -0400)
committerAdam Jackson <ajax@redhat.com>
Thu, 5 Oct 2017 17:43:34 +0000 (13:43 -0400)
commitb174a1ae720cb404738cd57c431f5769d677957d
treea8dc8f91976382a93d387cc1d8247cdbf0a1b9c5
parent15e208c4ccdd94582a459d0066b587f91caf270c
egl: Simplify the "driver" interface

"Driver" isn't a great word for what this layer is, it's effectively a
build-time choice about what OS you're targeting. Despite that both of
the extant backends totally ignore the display argument, the old code
would only set up the backend relative to a display.

That causes problems! One problem is it means eglGetProcAddress can
generate X or Wayland protocol when it tries to connect to a default
display so it can call into the backend, which is, you know, completely
bonkers. Any other EGL API that doesn't reference a display, like
EGL_EXT_device_query, would have the same issue.

Fortunately this is a problem that can be solved with the delete key.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
docs/egl.html
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/haiku/egl_haiku.cpp
src/egl/main/egldriver.c
src/egl/main/egldriver.h