summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorTina Zhang <tina.zhang@intel.com>2014-07-23 16:34:48 +0800
committerbohu <bohu@google.com>2014-09-18 17:15:44 -0700
commit6c6a12d1652c8872ae25162040224133888bf97a (patch)
tree192e89c5772790de96e6d47bc0418aef94eeb30c /opengl
parent2e6a15f7a40895681412356e9c7f5740cfad9d55 (diff)
downloadandroid_device_generic_goldfish-6c6a12d1652c8872ae25162040224133888bf97a.tar.gz
android_device_generic_goldfish-6c6a12d1652c8872ae25162040224133888bf97a.tar.bz2
android_device_generic_goldfish-6c6a12d1652c8872ae25162040224133888bf97a.zip
Remove display initialization from eglGetProcAddress API
We don't need to do the initialization in the eglGetProcAddress API. The work can be finished in the eglInitialize API. When zygote pre-loading resources, eglGetProcAddress will be called. If we let eglGetProcAddress do the display initialization, zygote will get the "qemu-pipe" handle of the "opengles" service. This is bad, because all the java processes which forked from zygote will get the same handle from zygote. Then the host service cannot distinguish from the device threads, and this will lead the emulator to crash. Signed-off-by: Tina Zhang <tina.zhang@intel.com> Signed-off-by: WeixingX Tian <weixingx.tian@intel.com> (cherry picked from commit 7a2929cd6548693b581c17ba69308a49e03c56be) Change-Id: I156970e004172e0bbe23a1a0c6c6b86850fd2ba6
Diffstat (limited to 'opengl')
-rw-r--r--opengl/system/egl/egl.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/opengl/system/egl/egl.cpp b/opengl/system/egl/egl.cpp
index 72e0037..daa52de 100644
--- a/opengl/system/egl/egl.cpp
+++ b/opengl/system/egl/egl.cpp
@@ -526,15 +526,6 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
}
}
- //
- // Make sure display is initialized before searching in client APIs
- //
- if (!s_display.initialized()) {
- if (!s_display.initialize(&s_eglIface)) {
- return NULL;
- }
- }
-
// look in gles client api's extensions table
return (__eglMustCastToProperFunctionPointerType)ClientAPIExts::getProcAddress(procname);