Check if RIEGLDisplay is already created in CEglThreadSession::EglInitialize,then return EGL_TRUE EGL_MERGE
authorJose Thachil<jose.thachil@cell-telecom.com>
Thu, 13 May 2010 09:27:58 +0100
branchEGL_MERGE
changeset 60 013f1c757b1e
parent 59 0fb7b31791c3
child 72 360f71440b77
Check if RIEGLDisplay is already created in CEglThreadSession::EglInitialize,then return EGL_TRUE
egl/eglrefimpl/src/session.cpp
--- 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)
 	{