diff options
author | Brian Paul <[email protected]> | 2008-06-04 11:34:10 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-06-04 11:36:59 -0600 |
commit | 97035cb19aaf508aad45446651a80da9af1d0e8c (patch) | |
tree | 8ed9a86e1f18c81d86e64df7d0263c2a914142e8 /src/egl/main/egldisplay.c | |
parent | 88f86c9d026fc71b78cc6d71c0faaed38d0d6927 (diff) |
egl: in _eglAddConfig() just save a pointer to the config; don't copy the config
This allows subclassing by drivers.
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r-- | src/egl/main/egldisplay.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index 8fd29b84216..540efd4fee5 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -96,11 +96,25 @@ _eglGetCurrentDisplay(void) } +/** + * Free all the data hanging of an _EGLDisplay object, but not + * the object itself. + */ void _eglCleanupDisplay(_EGLDisplay *disp) { - /* XXX incomplete */ + EGLint i; + + for (i = 0; i < disp->NumConfigs; i++) { + free(disp->Configs[i]); + } free(disp->Configs); + disp->Configs = NULL; + + /* XXX incomplete */ + free((void *) disp->DriverName); - /* driver deletes _EGLDisplay */ + disp->DriverName = NULL; + + /* driver deletes the _EGLDisplay object */ } |