diff options
author | Adam Jackson <[email protected]> | 2017-08-28 11:23:58 -0400 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2017-10-05 13:43:34 -0400 |
commit | b174a1ae720cb404738cd57c431f5769d677957d (patch) | |
tree | a8dc8f91976382a93d387cc1d8247cdbf0a1b9c5 /src/egl/drivers | |
parent | 15e208c4ccdd94582a459d0066b587f91caf270c (diff) |
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 <[email protected]>
Signed-off-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 4 | ||||
-rw-r--r-- | src/egl/drivers/haiku/egl_haiku.cpp | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index c2b16d11732..0db80a091f8 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -3193,12 +3193,10 @@ dri2_load(_EGLDriver *drv) * Create a new _EGLDriver object and init its dispatch table. */ _EGLDriver * -_eglBuiltInDriverDRI2(const char *args) +_eglBuiltInDriver(void) { struct dri2_egl_driver *dri2_drv; - (void) args; - dri2_drv = calloc(1, sizeof *dri2_drv); if (!dri2_drv) return NULL; diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 10f3abc070a..c17198d6dd8 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -322,7 +322,7 @@ haiku_unload(_EGLDriver* drv) */ extern "C" _EGLDriver* -_eglBuiltInDriverHaiku(const char *args) +_eglBuiltInDriver(void) { CALLED(); |