It is possible to move the final installation path of a shared
library by using LOCAL_MODULE_PATH/LOCAL_UNSTRIPPED_PATH in its
module declaration.
We do this for example to put certain libraries under /system/lib/egl
or /system/lib/hw.
However, the Android build system has a small bug where you cannot
depend on these shared libraries because it will complain it doesn't
find them under /system/lib, the default install location.
More precisely, consider libfoo defined as:
include $(CLEAR_VARS)
LOCAL_MODULE := libfoo
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
...
include $(BUILD_SHARED_LIBRARY)
Its final binary will be installed to /system/lib/egl/libfoo.so
Now, let's write a module that depends on it, as:
include $(CLEAR_VARS)
LOCAL_MODULE := libbar
LOCAL_SHARED_LIBRARIES += libfoo
...
include $(BUILD_SHARED_LIBRARY)
The build system will complain there is no rule to define the target
/system/lib/libfoo.so, but the target should be /system/lib/egl/libfoo.so.
A work-around is to define libbar as follows instead:
include $(CLEAR_VARS)
LOCAL_MODULE := libbar
LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_SHARED_LIBRARIES)/egl/libfoo.so
...
include $(BUILD_SHARED_LIBRARY)
This works if you don't need to link against the library when building your
shared library (which is fortunately the case for the GLES emulation
libraries).
That's essentially what this patch implements under common.mk. We update
emugl-set-shared-library-subpath to record that a module has been "moved",
and we avoid adding them to the LOCAL_SHARED_LIBRARIES variable of the
modules that export it.
+ Simplify three Android.mk files accordingly.
Change-Id: Id15bef5359b0daa8d82bfaa5abf9346f00190ab5
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 patch modifies the guest libraries to use the new
fast qemu "opengles" pipe to communicate with the host
renderer process.
Note that the renderer is still listening on a TCP socket
on port 22468.
Change-Id: I6ab84f972a8024e1fdababa4615d0650c8d461bf
Conflicts:
tools/emulator/opengl/tests/gles_android_wrapper/Android.mk
tools/emulator/opengl/tests/gles_android_wrapper/ServerConnection.h
This is the emulator opengl implementation of gralloc.
NOTE that it is currently build only if BUILD_EMULATOR_OPENGL_DRIVER
is defined, This is because the other driver peices (EGL/GLES) are
still missing.
Change-Id: If48f5ed619df6efb00cb4e590d99ce49d87875f6