summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsContext.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-08-17 19:28:29 -0700
committerJason Sams <rjsams@android.com>2010-08-17 19:28:29 -0700
commitd78be37d81f6c1aba75180c7608753a027a881ee (patch)
treee13892a43a7f497b32ed2d00d0ac6034458efe10 /libs/rs/rsContext.cpp
parent2e1872fe07cf8952812a417985e6e1f61bdeab5d (diff)
downloadframeworks_base-d78be37d81f6c1aba75180c7608753a027a881ee.zip
frameworks_base-d78be37d81f6c1aba75180c7608753a027a881ee.tar.gz
frameworks_base-d78be37d81f6c1aba75180c7608753a027a881ee.tar.bz2
Remove OOB object destruction.
Change-Id: Icaa06aca4a701ec663c124d3141d9dbb633d7dc1
Diffstat (limited to 'libs/rs/rsContext.cpp')
-rw-r--r--libs/rs/rsContext.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 2a94651..1a7c5ad 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -340,9 +340,6 @@ void * Context::threadProc(void *vrsc)
rsc->timerPrint();
rsc->timerReset();
}
- if (rsc->mObjDestroy.mNeedToEmpty) {
- rsc->objDestroyOOBRun();
- }
if (rsc->mThreadPriority > 0 && targetTime) {
int32_t t = (targetTime - (int32_t)(rsc->mTimeMSLastScript + rsc->mTimeMSLastSwap)) * 1000;
if (t > 0) {
@@ -367,9 +364,6 @@ void * Context::threadProc(void *vrsc)
}
ObjectBase::zeroAllUserRef(rsc);
- rsc->mObjDestroy.mNeedToEmpty = true;
- rsc->objDestroyOOBRun();
-
if (rsc->mIsGraphicsContext) {
pthread_mutex_lock(&gInitMutex);
rsc->deinitEGL();
@@ -488,7 +482,6 @@ Context::Context(Device *dev, bool isGraphics, bool useDepth)
mWndSurface = NULL;
- objDestroyOOBInit();
timerInit();
timerSet(RS_TIMER_INTERNAL);
@@ -534,8 +527,6 @@ Context::~Context()
mIO.shutdown();
int status = pthread_join(mThreadId, &res);
- mObjDestroy.mNeedToEmpty = true;
- objDestroyOOBRun();
// Global structure cleanup.
pthread_mutex_lock(&gInitMutex);
@@ -548,8 +539,6 @@ Context::~Context()
mDev = NULL;
}
pthread_mutex_unlock(&gInitMutex);
-
- objDestroyOOBDestroy();
}
void Context::setSurface(uint32_t w, uint32_t h, ANativeWindow *sur)
@@ -721,49 +710,6 @@ void Context::removeName(ObjectBase *obj)
}
}
-bool Context::objDestroyOOBInit()
-{
- if (!mObjDestroy.mMutex.init()) {
- LOGE("Context::ObjDestroyOOBInit mutex init failure");
- return false;
- }
- return true;
-}
-
-void Context::objDestroyOOBRun()
-{
- if (mObjDestroy.mNeedToEmpty) {
- if (!mObjDestroy.mMutex.lock()) {
- LOGE("Context::ObjDestroyOOBRun: error locking for OOBRun.");
- return;
- }
-
- for (size_t ct = 0; ct < mObjDestroy.mDestroyList.size(); ct++) {
- mObjDestroy.mDestroyList[ct]->decUserRef();
- }
- mObjDestroy.mDestroyList.clear();
- mObjDestroy.mNeedToEmpty = false;
- mObjDestroy.mMutex.unlock();
- }
-}
-
-void Context::objDestroyOOBDestroy()
-{
- rsAssert(!mObjDestroy.mNeedToEmpty);
-}
-
-void Context::objDestroyAdd(ObjectBase *obj)
-{
- if (!mObjDestroy.mMutex.lock()) {
- LOGE("Context::ObjDestroyOOBRun: error locking for OOBRun.");
- return;
- }
-
- mObjDestroy.mNeedToEmpty = true;
- mObjDestroy.mDestroyList.add(obj);
- mObjDestroy.mMutex.unlock();
-}
-
uint32_t Context::getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait)
{
//LOGE("getMessageToClient %i %i", bufferLen, wait);
@@ -1003,12 +949,6 @@ void rsContextDestroy(RsContext vrsc)
delete rsc;
}
-void rsObjDestroyOOB(RsContext vrsc, void *obj)
-{
- Context * rsc = static_cast<Context *>(vrsc);
- rsc->objDestroyAdd(static_cast<ObjectBase *>(obj));
-}
-
uint32_t rsContextGetMessage(RsContext vrsc, void *data, size_t *receiveLen, size_t bufferLen, bool wait)
{
Context * rsc = static_cast<Context *>(vrsc);