diff options
author | Brian Paul <[email protected]> | 2005-05-04 03:33:21 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-05-04 03:33:21 +0000 |
commit | c22990c29a5cdff89e6e3914aa565acc88a6a407 (patch) | |
tree | 5f8d766790274560d6e5be12c75877480beb798d /src/egl/main/eglglobals.c | |
parent | 3aeae2068510a369ba5c90ae1355d0b0ed89d5f5 (diff) |
sync with latest EGL_MESA_screen_surface spec (EGLScreenMESA handles)
Diffstat (limited to 'src/egl/main/eglglobals.c')
-rw-r--r-- | src/egl/main/eglglobals.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c index 102e5506206..6265b07529a 100644 --- a/src/egl/main/eglglobals.c +++ b/src/egl/main/eglglobals.c @@ -16,6 +16,7 @@ _eglInitGlobals(void) _eglGlobal.Displays = _eglNewHashTable(); _eglGlobal.Contexts = _eglNewHashTable(); _eglGlobal.Surfaces = _eglNewHashTable(); + _eglGlobal.FreeScreenHandle = 1; _eglGlobal.CurrentContext = EGL_NO_CONTEXT; _eglGlobal.LastError = EGL_SUCCESS; _eglGlobal.Initialized = EGL_TRUE; @@ -49,3 +50,16 @@ _eglError(EGLint errCode, const char *msg) fprintf(stderr, "EGL Error 0x%x in %s\n", errCode, msg); } } + + +/** + * Return a new screen handle/ID. + * NOTE: we never reuse these! + */ +EGLScreenMESA +_eglAllocScreenHandle(void) +{ + EGLScreenMESA s = _eglGlobal.FreeScreenHandle; + _eglGlobal.FreeScreenHandle++; + return s; +} |