Check if RIEGLDisplay is already created in CEglThreadSession::EglInitialize,then return EGL_TRUE
--- a/egl/eglrefimpl/src/session.cpp Wed May 12 13:05:33 2010 +0100
+++ b/egl/eglrefimpl/src/session.cpp Thu May 13 09:27:58 2010 +0100
@@ -190,16 +190,18 @@
return EGL_FALSE;
}
- RIEGLDisplay* Egldisplay = iEgl->getDisplay(aDisplay);
+ RIEGLDisplay* eglDispaly = iEgl->getDisplay(aDisplay);
+ if(eglDispaly)
+ return EGL_TRUE;
+
//create the current display
-
- RIEGLDisplay* newDisplay = NULL;
+ RIEGLDisplay* newDisplay = NULL;
try
{
newDisplay = new RIEGLDisplay(aDisplay); //throws bad_alloc
iEgl->addDisplay(newDisplay); //throws bad_alloc
- Egldisplay = newDisplay;
- RI_ASSERT(Egldisplay);
+ eglDispaly = newDisplay;
+ RI_ASSERT(eglDispaly);
}
catch(std::bad_alloc)
{