summaryrefslogtreecommitdiff
path: root/opengl/tests/gl_basic/gl_basic.cpp
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2017-04-05 14:23:52 +0900
committerSteven Moreland <smoreland@google.com>2017-04-09 14:17:12 -0700
commit5910dc7365f94ea10a879342710c76d577cb2690 (patch)
treedd335d26fc553c6b2ee7b93fca392d7fb379decd /opengl/tests/gl_basic/gl_basic.cpp
parentcde29667e4f93b266f2250b370a53f6eff8c6cbb (diff)
Load GL graphics drivers explicitly from sphal namespace
In Treble term, GL wrappers (libEGL.so, libGLES*.so, ...) are called SP-NDK and actual drivers (libEGL_*.so, libGLESv2_*.so, ...) are called SP-HALs. (SP = Same-Process). SP-HALs are developed by vendors and thus they can use only a subset of framework libraries that we call vndk-stable and subset of NDK libraries. It consists of libc, libm, liblog, libz, libnativewindow, libc++, ..., but not framework-only libraries such as libui, libandroid, etc. In order to enforce such restriction at run-time, we will use the linker namespace. Specifically, we create a new namespace named 'sphal' and configure it so that... 1) it can only search and load libraries from /vendor/lib, 2) it redirects the load/link request to the default namespace when the allowed list of libraries are requested from the caller, and 3) it rejects to search/load any library other than 1) and 2). The problem here is, GL wrapper need to tell the linker to load the drivers from the separate namespace (the 'sphal' namespace other than the default namespace. To specify the namespace, we need to use android_dlopen_ext() instead of dlopen().` Bug: 34407260 Bug: 37049319 Test: none, no op for now since we haven't create sphal namespace. Change-Id: I376dd9e5cc904452f669c27eb85c59b30b43dc39
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions