Reduce diffs with compat lib.

Change-Id: Ibfa2c7c7da56d158f424ac343e364feacd0a21da
diff --git a/cpu_ref/rsCpuScript.h b/cpu_ref/rsCpuScript.h
index 6097c83..b9973c9 100644
--- a/cpu_ref/rsCpuScript.h
+++ b/cpu_ref/rsCpuScript.h
@@ -39,6 +39,12 @@
         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 @@
     RsdCpuReferenceImpl *mCtx;
     const Script *mScript;
 
+#ifndef RS_COMPATIBILITY_LIB
     int (*mRoot)();
     int (*mRootExpand)();
     void (*mInit)();
@@ -94,6 +101,25 @@
     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;