OSDN Git Service

free EGL resources associated to a thread when it terminates
authorMathias Agopian <mathias@google.com>
Thu, 30 May 2013 23:07:36 +0000 (16:07 -0700)
committerMathias Agopian <mathias@google.com>
Thu, 30 May 2013 23:07:36 +0000 (16:07 -0700)
commit4e620ddce344e946ced992f61a69c367ff92fe24
treee54399a961f03e961411366deee168a3f9bd6e31
parent9e3cb55b8f6f007906872decfe3b8a2541e94dd2
free EGL resources associated to a thread when it terminates

destroyed but current-to-a-thread resources are only destroyed
when they're made not-current; however, we were not destroying
those when the thread itself terminated, causing these resources
to be leaked forever.

we now install a tls-key destructor that takes care of this
by calling eglReleaseThread upon thread termination.

Bug: 9209776
Change-Id: I88298a34e3a27488eb81eab76717715569c7d57c
opengl/libs/EGL/eglApi.cpp
opengl/libs/EGL/egl_tls.cpp
opengl/libs/EGL/egl_tls.h
opengl/libs/GLES_trace/src/gltrace_context.cpp