diff options
author | bohu <bohu@google.com> | 2017-05-30 10:31:46 -0700 |
---|---|---|
committer | bohu <bohu@google.com> | 2017-06-03 21:08:50 -0700 |
commit | 73cb02262b956368078fafa453a0be77de3b3080 (patch) | |
tree | 7497c5255f1be59ef59f8a4e7666564c3deb487f | |
parent | 8b0bfc77449832d148016ffc516d304dca9671a1 (diff) | |
download | device_generic_goldfish-opengl-73cb02262b956368078fafa453a0be77de3b3080.tar.gz device_generic_goldfish-opengl-73cb02262b956368078fafa453a0be77de3b3080.tar.bz2 device_generic_goldfish-opengl-73cb02262b956368078fafa453a0be77de3b3080.zip |
goldfish-opengl: move to vendor partition
move all the opengl related libraries to vendor/lib
, vendor/lib/egl and vendor/lib/hw respectively.
BUG: 37511975
Change-Id: I1c68e445b58f0268fc9e5ddfea0e64436e1e56df
-rw-r--r-- | common.mk | 4 | ||||
-rw-r--r-- | system/egl/eglDisplay.cpp | 14 |
2 files changed, 14 insertions, 4 deletions
@@ -38,6 +38,10 @@ emugl-begin-module = \ $(eval _EMUGL_INCLUDE_TYPE := $(BUILD_$2)) \ $(call _emugl-init-module,$1,$2,$3) +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo TREBLE),TREBLE) + emugl-begin-module += $(eval LOCAL_VENDOR_MODULE := true) +endif + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23 && echo PreMarshmallow),PreMarshmallow) emugl-begin-module += $(eval include external/stlport/libstlport.mk) endif diff --git a/system/egl/eglDisplay.cpp b/system/egl/eglDisplay.cpp index 5e94cfab..c7ff1791 100644 --- a/system/egl/eglDisplay.cpp +++ b/system/egl/eglDisplay.cpp @@ -80,6 +80,12 @@ eglDisplay::~eglDisplay() pthread_mutex_destroy(&m_surfaceLock); } +#if PLATFORM_SDK_VERSION >= 26 +#define PARTITION "/vendor" +#else +#define PARTITION "/system" +#endif + bool eglDisplay::initialize(EGLClient_eglInterface *eglIface) { pthread_mutex_lock(&m_lock); @@ -89,11 +95,11 @@ bool eglDisplay::initialize(EGLClient_eglInterface *eglIface) // load GLES client API // #if __LP64__ - m_gles_iface = loadGLESClientAPI("/system/lib64/egl/libGLESv1_CM_emulation.so", + m_gles_iface = loadGLESClientAPI(PARTITION "/lib64/egl/libGLESv1_CM_emulation.so", eglIface, &s_gles_lib); #else - m_gles_iface = loadGLESClientAPI("/system/lib/egl/libGLESv1_CM_emulation.so", + m_gles_iface = loadGLESClientAPI(PARTITION "/lib/egl/libGLESv1_CM_emulation.so", eglIface, &s_gles_lib); #endif @@ -105,11 +111,11 @@ bool eglDisplay::initialize(EGLClient_eglInterface *eglIface) #ifdef WITH_GLES2 #if __LP64__ - m_gles2_iface = loadGLESClientAPI("/system/lib64/egl/libGLESv2_emulation.so", + m_gles2_iface = loadGLESClientAPI(PARTITION "/lib64/egl/libGLESv2_emulation.so", eglIface, &s_gles2_lib); #else - m_gles2_iface = loadGLESClientAPI("/system/lib/egl/libGLESv2_emulation.so", + m_gles2_iface = loadGLESClientAPI(PARTITION "/lib/egl/libGLESv2_emulation.so", eglIface, &s_gles2_lib); #endif |