emulator opengl : unit-test renderer GLESv2

Make the unit test renderer (ut_renderer) encode GLESv2 commands.
A rendering thread has both V1 & V2 decoder object, and tryies to decode
commands of the two protocols from the stream.
Context creating is taking into account the API version and creates context
accordingly.
Decoder data is shared between the V1 & V2 decoders and applied to both of
them on makeCurrent (regardless to the requested context version)

Change-Id: If78e84310e5dcd22108c19656051b138b22e3c9f
This commit is contained in:
Jacky Romano
2011-04-25 12:59:37 +03:00
committed by David 'Digit' Turner
parent 25af30c464
commit 0c01f32aa2
4 changed files with 25 additions and 4 deletions

View File

@@ -147,6 +147,7 @@ int Renderer::makeCurrent(RenderingThread *thread,
eglContext = c->second->eglContext();
thread->setCurrentContext(c->second);
thread->glDecoder().setContextData(&c->second->decoderContextData());
thread->gl2Decoder().setContextData(&c->second->decoderContextData());
} else {
// same context is already set
eglContext = c->second->eglContext();
@@ -156,6 +157,7 @@ int Renderer::makeCurrent(RenderingThread *thread,
if (currentContext != NULL) currentContext->unref();
thread->setCurrentContext(NULL);
thread->glDecoder().setContextData(NULL);
thread->gl2Decoder().setContextData(NULL);
}
EGLSurface draw = EGL_NO_SURFACE;