diff options
author | Eric Engestrom <[email protected]> | 2017-09-25 22:35:24 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2018-10-31 11:01:54 +0000 |
commit | cb0980e69aa921af7086e5d00a547735bc3229e2 (patch) | |
tree | c9ee9e11bddd37dd98c90699609c29c3f5f53383 /src/egl/drivers/dri2 | |
parent | 21d9b78289fadc09c0dc5cf82eef9e798a99b196 (diff) |
egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku}
This is a revert of Marek's 84f3afc2e122cb418573 revert, with a missing
line added back. I failed a rebase and dropped that crucial line, and
didn't do a runtime test after my rebase, and as a result broke EGL for
everyone.
This commit has been tested by Intel's CI and I re-read it once more, so
it should be good this time.
--
Note: dropping the EGL_BAD_ALLOC in egl_haiku because it's
overwritten by the EGL_NOT_INITIALIZED in eglInitialize().
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 8b482c90be0..e38459de0b1 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -3255,16 +3255,11 @@ dri2_interop_export_object(_EGLDisplay *dpy, _EGLContext *ctx, /** * This is the main entrypoint into the driver, called by libEGL. - * Create a new _EGLDriver object and init its dispatch table. + * Gets an _EGLDriver object and init its dispatch table. */ -_EGLDriver * -_eglBuiltInDriver(void) +void +_eglInitDriver(_EGLDriver *dri2_drv) { - _EGLDriver *dri2_drv = calloc(1, sizeof *dri2_drv); - if (!dri2_drv) - return NULL; - - _eglInitDriverFallbacks(dri2_drv); dri2_drv->API.Initialize = dri2_initialize; dri2_drv->API.Terminate = dri2_terminate; dri2_drv->API.CreateContext = dri2_create_context; @@ -3316,6 +3311,4 @@ _eglBuiltInDriver(void) dri2_drv->API.SetBlobCacheFuncsANDROID = dri2_set_blob_cache_funcs; dri2_drv->Name = "DRI2"; - - return dri2_drv; } |