diff options
author | Chia-I Wu <[email protected]> | 2009-08-13 13:38:24 +0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-08-18 08:49:09 -0600 |
commit | 5a2c9372a0d9fa1efd924f9386a4e3df47c17d0e (patch) | |
tree | 2dee512255194f0eb3eefe2a9064ece8da3b3885 /src/egl/main/eglapi.c | |
parent | 0eaa02c836821556c1e8d0141f49f57e23f2548d (diff) |
egl: Some per-driver data should be per-display.
Move some fields of _EGLDriver to _EGLDisplay. It also becomes
unnecessary to pass _EGLDisplay to drivers when _eglMain is called.
Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/egl/main/eglapi.c')
-rw-r--r-- | src/egl/main/eglapi.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 464da00fe2c..a23b57120c4 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -87,15 +87,18 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) return _eglError(EGL_NOT_INITIALIZED, __FUNCTION__); } - drv->APImajor = major_int; - drv->APIminor = minor_int; - snprintf(drv->Version, sizeof(drv->Version), + disp->APImajor = major_int; + disp->APIminor = minor_int; + snprintf(disp->Version, sizeof(disp->Version), "%d.%d (%s)", major_int, minor_int, drv->Name); + /* update the global notion of supported APIs */ + _eglGlobal.ClientAPIsMask |= disp->ClientAPIsMask; + disp->Driver = drv; } else { - major_int = drv->APImajor; - minor_int = drv->APIminor; + major_int = disp->APImajor; + minor_int = disp->APIminor; } /* Update applications version of major and minor if not NULL */ |