egl/sfopenvg/riMiniEGL.cpp
branchEGL_MERGE
changeset 74 0f98da52363f
parent 72 360f71440b77
child 75 b3f964e007c8
equal deleted inserted replaced
73:a935d7985d66 74:0f98da52363f
   428 		{
   428 		{
   429 		delete es;
   429 		delete es;
   430 		return NULL;
   430 		return NULL;
   431 		}
   431 		}
   432 	return es->getEgl();
   432 	return es->getEgl();
   433 
       
   434 	
       
   435 }
   433 }
   436 static void releaseEGL()
   434 static void releaseEGL()
   437 {
   435 {
   438 /*
   436 /*
   439 	if(g_egl)
   437 	if(g_egl)
   443 			RI_DELETE(g_egl);
   441 			RI_DELETE(g_egl);
   444 			g_egl = NULL;
   442 			g_egl = NULL;
   445 		}
   443 		}
   446 	}
   444 	}
   447 	*/
   445 	*/
   448 	EGL* pEgl = static_cast<EGL*>(Dll::Tls());
   446 	CEglThreadSession* es = reinterpret_cast<CEglThreadSession*>(Dll::Tls());
   449 	if (pEgl)
   447 	if (es)
   450 		delete pEgl; 
   448 		{
       
   449 		EGL* pEgl = es->getEgl();
       
   450 		if (pEgl)
       
   451 			delete pEgl;
       
   452 		}
   451 	Dll::SetTls(NULL);
   453 	Dll::SetTls(NULL);
   452 
       
   453 }
   454 }
   454 
   455 
   455 /*-------------------------------------------------------------------*//*!
   456 /*-------------------------------------------------------------------*//*!
   456 * \brief	Given a display ID, return the corresponding object, or NULL
   457 * \brief	Given a display ID, return the corresponding object, or NULL
   457 *			if the ID hasn't been initialized.
   458 *			if the ID hasn't been initialized.