summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsContext.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2011-01-09 16:09:51 -0800
committerJason Sams <rjsams@android.com>2011-01-09 16:09:51 -0800
commit84035ff6f50dfb999d26ba476d5cb7619fa9cc57 (patch)
tree30baf96120955f992e1e5dd0f1cc1e31cd791749 /libs/rs/rsContext.cpp
parentccf9d10bd45a98c0004a15690d55aa8259659e40 (diff)
downloadframeworks_base-84035ff6f50dfb999d26ba476d5cb7619fa9cc57.zip
frameworks_base-84035ff6f50dfb999d26ba476d5cb7619fa9cc57.tar.gz
frameworks_base-84035ff6f50dfb999d26ba476d5cb7619fa9cc57.tar.bz2
Fix cleanup race condition where objects might may not
be cleaned up correctly. Change-Id: Ia48e06c3d050b6b39b39f8fdc9f0eb89b92fe1bf
Diffstat (limited to 'libs/rs/rsContext.cpp')
-rw-r--r--libs/rs/rsContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index c437d72..6a065b2 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -539,6 +539,7 @@ void Context::destroyWorkerThreadResources() {
}
ObjectBase::zeroAllUserRef(this);
LOGV("destroyWorkerThreadResources 2");
+ mExit = true;
}
void * Context::helperThreadProc(void *vrsc) {
@@ -713,6 +714,9 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) {
Context::~Context() {
LOGV("Context::~Context");
+
+ mIO.mToCore.flush();
+ rsAssert(mExit);
mExit = true;
mPaused = false;
void *res;