diff options
| author | Jean-Luc Brouillet <jeanluc@google.com> | 2014-03-25 16:27:34 -0700 |
|---|---|---|
| committer | Jean-Luc Brouillet <jeanluc@google.com> | 2014-03-25 17:04:31 -0700 |
| commit | 23037481bccbc09baa8f76b0015534571ccd2a4e (patch) | |
| tree | 71b798ec3d4e9fee49aefd4e4596b4591aaaaedf /rsScriptC.cpp | |
| parent | 6dc86b492191f9062e912afd948e08362201f332 (diff) | |
| download | android_frameworks_rs-23037481bccbc09baa8f76b0015534571ccd2a4e.tar.gz android_frameworks_rs-23037481bccbc09baa8f76b0015534571ccd2a4e.tar.bz2 android_frameworks_rs-23037481bccbc09baa8f76b0015534571ccd2a4e.zip | |
Remove the obsolete ScriptCState. Simplify cascading #ifdefs.
Change-Id: I1cb561c6325d80c764d386f7b76e6a416261cd8f
modified: rsContext.h
modified: rsScriptC.cpp
modified: rsScriptC.h
Diffstat (limited to 'rsScriptC.cpp')
| -rw-r--r-- | rsScriptC.cpp | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/rsScriptC.cpp b/rsScriptC.cpp index f84c4b42..3a22b163 100644 --- a/rsScriptC.cpp +++ b/rsScriptC.cpp @@ -17,14 +17,10 @@ #include "rsContext.h" #include "rsScriptC.h" -#ifndef FAKE_ARM64_BUILD -#ifndef RS_COMPATIBILITY_LIB -#ifndef ANDROID_RS_SERIALIZE +#if !defined(FAKE_ARM64_BUILD) && !defined(RS_COMPATIBILITY_LIB) && !defined(ANDROID_RS_SERIALIZE) #include <bcinfo/BitcodeTranslator.h> #include <bcinfo/BitcodeWrapper.h> #endif -#endif -#endif #if !defined(RS_SERVER) && !defined(RS_COMPATIBILITY_LIB) #include "utils/Timers.h" @@ -42,26 +38,18 @@ using namespace android::renderscript; ScriptC * sc = (ScriptC *) tls->mScript ScriptC::ScriptC(Context *rsc) : Script(rsc) { -#ifndef FAKE_ARM64_BUILD -#ifndef RS_COMPATIBILITY_LIB -#ifndef ANDROID_RS_SERIALIZE +#if !defined(FAKE_ARM64_BUILD) && !defined(RS_COMPATIBILITY_LIB) && !defined(ANDROID_RS_SERIALIZE) BT = NULL; #endif -#endif -#endif } ScriptC::~ScriptC() { -#ifndef FAKE_ARM64_BUILD -#ifndef RS_COMPATIBILITY_LIB -#ifndef ANDROID_RS_SERIALIZE +#if !defined(FAKE_ARM64_BUILD) && !defined(RS_COMPATIBILITY_LIB) && !defined(ANDROID_RS_SERIALIZE) if (BT) { delete BT; BT = NULL; } #endif -#endif -#endif if (mInitialized) { mRSC->mHal.funcs.script.invokeFreeChildren(mRSC, this); mRSC->mHal.funcs.script.destroy(mRSC, this); @@ -213,43 +201,6 @@ void ScriptC::Invoke(Context *rsc, uint32_t slot, const void *data, size_t len) rsc->mHal.funcs.script.invokeFunction(rsc, this, slot, data, len); } -ScriptCState::ScriptCState() { -} - -ScriptCState::~ScriptCState() { -} - -/* -static void* symbolLookup(void* pContext, char const* name) { - const ScriptCState::SymbolTable_t *sym; - ScriptC *s = (ScriptC *)pContext; - if (!strcmp(name, "__isThreadable")) { - return (void*) s->mHal.info.isThreadable; - } else if (!strcmp(name, "__clearThreadable")) { - s->mHal.info.isThreadable = false; - return NULL; - } - sym = ScriptCState::lookupSymbol(name); - if (!sym) { - sym = ScriptCState::lookupSymbolCL(name); - } - if (!sym) { - sym = ScriptCState::lookupSymbolGL(name); - } - if (sym) { - s->mHal.info.isThreadable &= sym->threadable; - return sym->mPtr; - } - ALOGE("ScriptC sym lookup failed for %s", name); - return NULL; -} -*/ - -#if 0 -extern const char rs_runtime_lib_bc[]; -extern unsigned rs_runtime_lib_bc_size; -#endif - bool ScriptC::runCompiler(Context *rsc, const char *resName, const char *cacheDir, |
