Lines Matching refs:mod
197 _eglLoadModule(_EGLModule *mod) in _eglLoadModule() argument
203 if (mod->Driver) in _eglLoadModule()
206 if (mod->BuiltIn) { in _eglLoadModule()
208 mainFunc = mod->BuiltIn; in _eglLoadModule()
211 mainFunc = _eglOpenLibrary(mod->Path, &lib); in _eglLoadModule()
224 _eglLog(_EGL_WARNING, "Driver loaded from %s has no name", mod->Path); in _eglLoadModule()
228 mod->Handle = (void *) lib; in _eglLoadModule()
229 mod->Driver = drv; in _eglLoadModule()
239 _eglUnloadModule(_EGLModule *mod) in _eglUnloadModule() argument
243 if (mod->Driver && mod->Driver->Unload) in _eglUnloadModule()
244 mod->Driver->Unload(mod->Driver); in _eglUnloadModule()
251 if (mod->Handle) in _eglUnloadModule()
252 close_library(mod->Handle); in _eglUnloadModule()
258 mod->Driver = NULL; in _eglUnloadModule()
259 mod->Handle = NULL; in _eglUnloadModule()
269 _EGLModule *mod; in _eglAddModule() local
280 mod = _eglModules->Elements[i]; in _eglAddModule()
281 if (strcmp(mod->Path, path) == 0) in _eglAddModule()
282 return mod; in _eglAddModule()
286 mod = calloc(1, sizeof(*mod)); in _eglAddModule()
287 if (mod) { in _eglAddModule()
288 mod->Path = _eglstrdup(path); in _eglAddModule()
289 if (!mod->Path) { in _eglAddModule()
290 free(mod); in _eglAddModule()
291 mod = NULL; in _eglAddModule()
294 if (mod) { in _eglAddModule()
295 _eglAppendArray(_eglModules, (void *) mod); in _eglAddModule()
296 _eglLog(_EGL_DEBUG, "added %s to module array", mod->Path); in _eglAddModule()
299 return mod; in _eglAddModule()
309 _EGLModule *mod = (_EGLModule *) module; in _eglFreeModule() local
311 _eglUnloadModule(mod); in _eglFreeModule()
312 free(mod->Path); in _eglFreeModule()
313 free(mod); in _eglFreeModule()
497 _EGLModule *mod; in _eglAddUserDriver() local
503 mod = _eglAddModule(env); in _eglAddUserDriver()
504 if (mod) in _eglAddUserDriver()
505 mod->BuiltIn = _eglBuiltInDrivers[i].main; in _eglAddUserDriver()
542 _EGLModule *mod; in _eglAddBuiltInDrivers() local
546 mod = _eglAddModule(_eglBuiltInDrivers[i].name); in _eglAddBuiltInDrivers()
547 if (mod) in _eglAddBuiltInDrivers()
548 mod->BuiltIn = _eglBuiltInDrivers[i].main; in _eglAddBuiltInDrivers()
600 _EGLModule *mod = (_EGLModule *) _eglModules->Elements[i]; in _eglMatchAndInitialize() local
602 if (!_eglLoadModule(mod)) { in _eglMatchAndInitialize()
608 if (mod->Driver->API.Initialize(mod->Driver, dpy)) { in _eglMatchAndInitialize()
609 drv = mod->Driver; in _eglMatchAndInitialize()
675 _EGLModule *mod = (_EGLModule *) _eglModules->Elements[i]; in _eglGetDriverProc() local
677 if (!mod->Driver) in _eglGetDriverProc()
679 proc = mod->Driver->API.GetProcAddress(mod->Driver, procname); in _eglGetDriverProc()