From db5ce8b3843a03c6f83a02a79f033d7e74784dd5 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 17 Feb 2010 18:39:27 +0800 Subject: egl: Make eglGetDisplay atomic. Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay. Remove unused _eglUnlinkDisplay. --- src/egl/main/eglapi.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/egl/main/eglapi.c') diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 66fbbe219f..d5e69a6e25 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -208,18 +208,12 @@ _eglCheckMode(_EGLDisplay *disp, _EGLMode *m, const char *msg) /** * This is typically the first EGL function that an application calls. - * We initialize our global vars and create a private _EGLDisplay object. + * It associates a private _EGLDisplay object to the native display. */ EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType nativeDisplay) { - _EGLDisplay *dpy; - dpy = _eglFindDisplay(nativeDisplay); - if (!dpy) { - dpy = _eglNewDisplay(nativeDisplay); - if (dpy) - _eglLinkDisplay(dpy); - } + _EGLDisplay *dpy = _eglFindDisplay(nativeDisplay); return _eglGetDisplayHandle(dpy); } -- cgit v1.2.3