summaryrefslogtreecommitdiff
path: root/rsContext.h
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2011-01-31 14:53:24 -0800
committerAlex Sakhartchouk <alexst@google.com>2011-01-31 14:53:24 -0800
commit77d9f4bd05b2d2a161f30c12a2248f9c97eaac42 (patch)
tree3a709b9ac16afd941095e64fa961e4387f9175ee /rsContext.h
parent099d7d33e55afeb3399f6e8cf8d665223ca94939 (diff)
downloadrs-77d9f4bd05b2d2a161f30c12a2248f9c97eaac42.tar.gz
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
Diffstat (limited to 'rsContext.h')
-rw-r--r--rsContext.h50
1 files changed, 43 insertions, 7 deletions
diff --git a/rsContext.h b/rsContext.h
index 9f94f26a..c5e32a67 100644
--- a/rsContext.h
+++ b/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 @@ namespace renderscript {
#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 @@ private:
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