diff options
| author | Miao Wang <miaowang@google.com> | 2015-02-05 02:31:18 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-05 02:31:18 +0000 |
| commit | 28e2a30f118a52d87399bf1a961f3ea4f440fce8 (patch) | |
| tree | 3ee01ca31a73e2dbc5e6d3288ee6bc2b9aea890b /cpp | |
| parent | 97666d842bd66649168918628ea40eea3fbca36a (diff) | |
| parent | fe4f02f81d7c461835be97eebbde744885846e99 (diff) | |
| download | android_frameworks_rs-28e2a30f118a52d87399bf1a961f3ea4f440fce8.tar.gz android_frameworks_rs-28e2a30f118a52d87399bf1a961f3ea4f440fce8.tar.bz2 android_frameworks_rs-28e2a30f118a52d87399bf1a961f3ea4f440fce8.zip | |
am fe4f02f8: Merge "Make rsContext be able to have info about the path of native libs for 64bit Renderscript compat lib."
* commit 'fe4f02f81d7c461835be97eebbde744885846e99':
Make rsContext be able to have info about the path of native libs for 64bit Renderscript compat lib.
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/rsDispatch.cpp | 9 | ||||
| -rw-r--r-- | cpp/rsDispatch.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/cpp/rsDispatch.cpp b/cpp/rsDispatch.cpp index 93ad6c19..6a1bbdd2 100644 --- a/cpp/rsDispatch.cpp +++ b/cpp/rsDispatch.cpp @@ -22,7 +22,14 @@ #define LOG_API(...) bool loadSymbols(void* handle, dispatchTable& dispatchTab) { - + //fucntion to set the native lib path for 64bit compat lib. +#ifdef __LP64__ + dispatchTab.SetNativeLibDir = (SetNativeLibDirFnPtr)dlsym(handle, "rsaContextSetNativeLibDir"); + if (dispatchTab.SetNativeLibDir == NULL) { + LOG_API("Couldn't initialize dispatchTab.SetNativeLibDir"); + return false; + } +#endif dispatchTab.AllocationGetType = (AllocationGetTypeFnPtr)dlsym(handle, "rsaAllocationGetType"); if (dispatchTab.AllocationGetType == NULL) { LOG_API("Couldn't initialize dispatchTab.AllocationGetType"); diff --git a/cpp/rsDispatch.h b/cpp/rsDispatch.h index a32a9b0f..a70e9deb 100644 --- a/cpp/rsDispatch.h +++ b/cpp/rsDispatch.h @@ -20,6 +20,7 @@ #include "rsInternalDefines.h" #include "jni.h" +typedef void (*SetNativeLibDirFnPtr)(RsContext con, const char *nativeLibDir, size_t length); typedef const void* (*AllocationGetTypeFnPtr)(RsContext con, RsAllocation va); typedef void (*TypeGetNativeDataFnPtr)(RsContext, RsType, uintptr_t *typeData, uint32_t typeDataSize); typedef void (*ElementGetNativeDataFnPtr)(RsContext, RsElement, uintptr_t *elemData, uint32_t elemDataSize); @@ -92,6 +93,8 @@ typedef void (*AllocationIoReceiveFnPtr) (RsContext, RsAllocation); typedef void * (*AllocationGetPointerFnPtr) (RsContext, RsAllocation, uint32_t lod, RsAllocationCubemapFace face, uint32_t z, uint32_t array, size_t *stride); struct dispatchTable { + SetNativeLibDirFnPtr SetNativeLibDir; + // inserted by hand from rs.h AllocationGetTypeFnPtr AllocationGetType; TypeGetNativeDataFnPtr TypeGetNativeData; |
