From 110f181b7966212a36ef18016f9b81c7322d0a2f Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Thu, 14 Mar 2013 16:02:18 -0700 Subject: Reduce diffs with compat lib. Change-Id: Ibfa2c7c7da56d158f424ac343e364feacd0a21da --- cpu_ref/rsCpuScript.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'cpu_ref/rsCpuScript.h') 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; -- cgit v1.2.3