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:
Guy Zadickario
2011-08-01 08:34:34 +03:00
committed by David 'Digit' Turner
parent 385d396f1e
commit 467e5fb162
9 changed files with 136 additions and 27 deletions

View File

@@ -106,6 +106,13 @@ HostConnection *HostConnection::get()
}
con->m_stream = stream;
}
// send zero 'clientFlags' to the host.
unsigned int *pClientFlags =
(unsigned int *)con->m_stream->allocBuffer(sizeof(unsigned int));
*pClientFlags = 0;
con->m_stream->commitBuffer(sizeof(unsigned int));
LOGD("HostConnection::get() New Host Connection established %p, tid %d\n", con, gettid());
tinfo->hostConn = con;
}