summaryrefslogtreecommitdiff
path: root/src/egl/main/eglapi.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-02-17 18:39:27 +0800
committerChia-I Wu <olv@lunarg.com>2010-02-17 20:00:12 +0800
commitdb5ce8b3843a03c6f83a02a79f033d7e74784dd5 (patch)
treea947f66eca9512ac82a53e1acf05173b92f977cc /src/egl/main/eglapi.c
parent99bcb1f06d35a038b9fcf9786938a31b3dba21b7 (diff)
egl: Make eglGetDisplay atomic.
Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay. Remove unused _eglUnlinkDisplay.
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r--src/egl/main/eglapi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 66fbbe219f3..d5e69a6e25c 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);
}