Cleaning up the serialization change.
Renaming the define to be more in line with what it does and removing the host stub header file.
Change-Id: Ibd3a0a6a398c7f81cc661f71e4478707fe1679ed
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 9f94f26..c5e32a6 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -18,16 +18,16 @@
#define ANDROID_RS_CONTEXT_H
#include "rsUtils.h"
-#include "rsMutex.h"
-
-#include "rsThreadIO.h"
#include "rsType.h"
-#include "rsMatrix.h"
#include "rsAllocation.h"
#include "rsMesh.h"
+
+#ifndef ANDROID_RS_SERIALIZE
+#include "rsMutex.h"
+#include "rsThreadIO.h"
+#include "rsMatrix.h"
#include "rsDevice.h"
#include "rsScriptC.h"
-#include "rsAllocation.h"
#include "rsAdapter.h"
#include "rsSampler.h"
#include "rsFont.h"
@@ -42,6 +42,7 @@
#include "rsLocklessFifo.h"
#include <ui/egl/android_natives.h>
+#endif // ANDROID_RS_SERIALIZE
// ---------------------------------------------------------------------------
namespace android {
@@ -66,6 +67,8 @@
#define CHECK_OBJ_OR_NULL(o)
#endif
+#ifndef ANDROID_RS_SERIALIZE
+
class Context {
public:
static Context * createContext(Device *, const RsSurfaceConfig *sc);
@@ -321,6 +324,39 @@
uint32_t mAverageFPS;
};
-}
-}
+#else
+
+class Context {
+public:
+ Context() {
+ mObjHead = NULL;
+ }
+ ~Context() {
+ ObjectBase::zeroAllUserRef(this);
+ }
+
+ ElementState mStateElement;
+ TypeState mStateType;
+
+ struct {
+ bool mLogTimes;
+ bool mLogScripts;
+ bool mLogObjects;
+ bool mLogShaders;
+ bool mLogShadersAttr;
+ bool mLogShadersUniforms;
+ bool mLogVisual;
+ } props;
+
+ void setError(RsError e, const char *msg = NULL) { }
+
+ mutable const ObjectBase * mObjHead;
+
+protected:
+
+};
+#endif //ANDROID_RS_SERIALIZE
+
+} // renderscript
+} // android
#endif