diff options
author | Alex Sakhartchouk <alexst@google.com> | 2011-01-31 14:53:24 -0800 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2011-01-31 14:53:24 -0800 |
commit | d0f5bd130bdbd5b357b7f1db4562fa55e06d384c (patch) | |
tree | 48ee3f26d8879c2a92b8ee60df9821d46666e9e2 /libs/rs/rsContext.h | |
parent | e62e890b68cce46b4ed19010874707d3d45fa258 (diff) | |
download | frameworks_base-d0f5bd130bdbd5b357b7f1db4562fa55e06d384c.zip frameworks_base-d0f5bd130bdbd5b357b7f1db4562fa55e06d384c.tar.gz frameworks_base-d0f5bd130bdbd5b357b7f1db4562fa55e06d384c.tar.bz2 |
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 'libs/rs/rsContext.h')
-rw-r--r-- | libs/rs/rsContext.h | 50 |
1 files changed, 43 insertions, 7 deletions
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 @@ 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 |