12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #include "cpp/rsDispatch.h"
- #include "rsFallbackAdaptation.h"
- #include <log/log.h>
- #include <dlfcn.h>
- #undef LOG_TAG
- #define LOG_TAG "RenderScript Graphics Fallback"
- dispatchTable RsFallbackAdaptation::mEntryFuncs;
- RsFallbackAdaptation::RsFallbackAdaptation()
- {
- void* handle = dlopen("libRS_internal.so", RTLD_LAZY | RTLD_LOCAL);
- if (handle == NULL) {
- ALOGE("couldn't dlopen %s.", dlerror());
- return;
- }
- if (loadSymbols(handle, mEntryFuncs) == false) {
-
-
-
- ALOGE("Fallback dispatch table init failed!");
- mEntryFuncs = {};
- dlclose(handle);
- }
- }
- RsFallbackAdaptation& RsFallbackAdaptation::GetInstance()
- {
-
-
-
- static RsFallbackAdaptation instance;
- return instance;
- }
- const dispatchTable* RsFallbackAdaptation::GetEntryFuncs()
- {
- return &mEntryFuncs;
- }
|