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