summaryrefslogtreecommitdiffstats
path: root/rsContext.h
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-03-03 13:03:18 -0800
committerJason Sams <rjsams@android.com>2010-03-03 14:14:37 -0800
commita2cf755a28a1e7ffff2955df656d714f40e4d715 (patch)
treef95205908caee236ace7f0ecaf3874a261844201 /rsContext.h
parent779729718eab8ab5d1a3cd4b755a735acc241e6c (diff)
downloadandroid_frameworks_rs-a2cf755a28a1e7ffff2955df656d714f40e4d715.tar.gz
android_frameworks_rs-a2cf755a28a1e7ffff2955df656d714f40e4d715.tar.bz2
android_frameworks_rs-a2cf755a28a1e7ffff2955df656d714f40e4d715.zip
Improve RS error handling. On errors RS will now store the error and a message that can be read from the app. RS will then not continue rendering frames while an unchecked error is present until new state is received.
Diffstat (limited to 'rsContext.h')
-rw-r--r--rsContext.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/rsContext.h b/rsContext.h
index 04bd7486..82c36874 100644
--- a/rsContext.h
+++ b/rsContext.h
@@ -93,7 +93,7 @@ public:
const ProgramRaster * getRaster() {return mRaster.get();}
const ProgramVertex * getVertex() {return mVertex.get();}
- void setupCheck();
+ bool setupCheck();
bool checkDriver() const {return mEGL.mSurface != 0;}
void pause();
@@ -160,6 +160,8 @@ public:
void dumpDebug() const;
void checkError(const char *) const;
+ const char * getError(RsError *);
+ void setError(RsError e, const char *msg);
mutable const ObjectBase * mObjHead;
@@ -211,6 +213,8 @@ protected:
bool mExit;
bool mUseDepth;
bool mPaused;
+ RsError mError;
+ const char *mErrorMsg;
pthread_t mThreadId;
pid_t mNativeThreadId;