summaryrefslogtreecommitdiff
path: root/cpu_ref/rsCpuScript.h
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2013-03-14 16:02:18 -0700
committerTim Murray <timmurray@google.com>2013-03-15 12:01:29 -0700
commit110f181b7966212a36ef18016f9b81c7322d0a2f (patch)
tree70a951e191d53b5a3b483c312f1e691174b0f943 /cpu_ref/rsCpuScript.h
parent5a1fa4f6c8efa96badaba98afabdd66bb07486d7 (diff)
downloadrs-110f181b7966212a36ef18016f9b81c7322d0a2f.tar.gz
Reduce diffs with compat lib.
Change-Id: Ibfa2c7c7da56d158f424ac343e364feacd0a21da
Diffstat (limited to 'cpu_ref/rsCpuScript.h')
-rw-r--r--cpu_ref/rsCpuScript.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpu_ref/rsCpuScript.h b/cpu_ref/rsCpuScript.h
index 6097c836..b9973c90 100644
--- a/cpu_ref/rsCpuScript.h
+++ b/cpu_ref/rsCpuScript.h
@@ -39,6 +39,12 @@ public:
const RsForEachStubParamStruct *,
uint32_t x1, uint32_t x2,
uint32_t instep, uint32_t outstep);
+#ifdef RS_COMPATIBILITY_LIB
+ typedef void (* InvokeFunc_t)(void);
+ typedef void (* ForEachFunc_t)(void);
+ typedef int (* RootFunc_t)(void);
+ typedef void (*WorkerCallback_t)(void *usr, uint32_t idx);
+#endif
bool init(char const *resName, char const *cacheDir,
uint8_t const *bitcode, size_t bitcodeSize, uint32_t flags);
@@ -86,6 +92,7 @@ protected:
RsdCpuReferenceImpl *mCtx;
const Script *mScript;
+#ifndef RS_COMPATIBILITY_LIB
int (*mRoot)();
int (*mRootExpand)();
void (*mInit)();
@@ -94,6 +101,25 @@ protected:
bcc::BCCContext *mCompilerContext;
bcc::RSCompilerDriver *mCompilerDriver;
bcc::RSExecutable *mExecutable;
+#else
+ void *mScriptSO;
+ RootFunc_t mRoot;
+ RootFunc_t mRootExpand;
+ InvokeFunc_t mInit;
+ InvokeFunc_t mFreeChildren;
+ InvokeFunc_t *mInvokeFunctions;
+ ForEachFunc_t *mForEachFunctions;
+
+ void **mFieldAddress;
+ bool *mFieldIsObject;
+ uint32_t *mForEachSignatures;
+
+ // for populate script
+ //int mVersionMajor;
+ //int mVersionMinor;
+ size_t mExportedVariableCount;
+ size_t mExportedFunctionCount;
+#endif
Allocation **mBoundAllocs;
void * mIntrinsicData;