OSDN Git Service

Add 64-bit software GLES/EGL support in gralloc.goldfish module
authorTina Zhang <tina.zhang@intel.com>
Fri, 18 Apr 2014 06:21:23 +0000 (14:21 +0800)
committerTina Zhang <tina.zhang@intel.com>
Fri, 18 Apr 2014 07:03:55 +0000 (15:03 +0800)
If the emulator chooses running without using the host GPU to
do the GLES/EGL acceleration, the gralloc.goldfish module
must let the emulator use gralloc.default module which
can support the software GLES/EGL. Add this support for
64-bit emulator.

Change-Id: I241e70ce26a8f0298a32e3a55037fc3028a2e2a7
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
system/gralloc/gralloc.cpp

index 2bdf8da..f6f448c 100644 (file)
@@ -1028,7 +1028,11 @@ fallback_init(void)
         return;
     }
     ALOGD("Emulator without GPU emulation detected.");
+#if __LP64__
+    module = dlopen("/system/lib64/hw/gralloc.default.so", RTLD_LAZY|RTLD_LOCAL);
+#else
     module = dlopen("/system/lib/hw/gralloc.default.so", RTLD_LAZY|RTLD_LOCAL);
+#endif
     if (module != NULL) {
         sFallback = reinterpret_cast<gralloc_module_t*>(dlsym(module, HAL_MODULE_INFO_SYM_AS_STR));
         if (sFallback == NULL) {