opengles emulator: use bionic tls slot

This make the EGL/GLESv1/GLESv2 libraries on the guest to use
the OPENGL bionic tls slot for faster tls access.
Note that we still setting the slower tls in order to have the
tls destructor which allow us to close the host connection
when the thread exits.

Gives slightly performance improvement, the avg score for the
teapot test in 0xBench goes from 34 to 37 fps. (This test is
near immediate mode since it renders a lot of small primitives
so it is a good candicate to be improved).

Change-Id: I9060c75cc29c2e28721fa11d3f318b438edb5da9
This commit is contained in:
Guy Zadickario
2011-08-16 15:01:07 +03:00
parent 2c68d0f347
commit 75094ee1ac
7 changed files with 35 additions and 6 deletions

View File

@@ -6,10 +6,11 @@
#include "ErrorLog.h"
#include <private/ui/android_natives_priv.h>
#include "gralloc_cb.h"
#include "ThreadInfo.h"
//XXX: fix this macro to get the context from fast tls path
#define GET_CONTEXT gl_client_context_t * ctx = HostConnection::get()->glEncoder();
#define GET_CONTEXT gl_client_context_t * ctx = getEGLThreadInfo()->hostConn->glEncoder();
#include "gl_entry.cpp"