opengles emulator: fixed renderer termination flow
Handling clean exit of the renderer when stopOpenGLRenderer is called. This is done by openning a connection to the renderer and flag that it should exit. Added 'clientFlags' field which must be send after every connection is made to the renderer for this purpose. The server will wait for running rendering threads to exit and then will close all EGL/GL resources and will exit. The stopOpenGLRenderer will return only when the renderer has exited. Change-Id: I8272b8ea59d5fc78453bb7bd2d25908068869fa7
This commit is contained in:
committed by
David 'Digit' Turner
parent
385d396f1e
commit
467e5fb162
@@ -85,6 +85,9 @@ static const char *getGLES2ExtensionString(EGLDisplay p_dpy,
|
||||
|
||||
void FrameBuffer::finalize(){
|
||||
if(s_theFrameBuffer){
|
||||
s_theFrameBuffer->m_colorbuffers.clear();
|
||||
s_theFrameBuffer->m_windows.clear();
|
||||
s_theFrameBuffer->m_contexts.clear();
|
||||
s_egl.eglMakeCurrent(s_theFrameBuffer->m_eglDisplay, NULL, NULL, NULL);
|
||||
s_egl.eglDestroySurface(s_theFrameBuffer->m_eglDisplay,s_theFrameBuffer->m_eglSurface);
|
||||
s_egl.eglDestroyContext(s_theFrameBuffer->m_eglDisplay,s_theFrameBuffer->m_eglContext);
|
||||
|
||||
Reference in New Issue
Block a user