summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsContext.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2010-09-28 15:45:45 -0700
committerStephen Hines <srhines@google.com>2010-09-29 16:58:17 -0700
commit01f0ad7c13b8878c2167bff10ea875d7509edca5 (patch)
treea23bced149e474da62c7da992015a5e3163486f9 /libs/rs/rsContext.cpp
parent3ebb1ba50c9b98e5303eb21ed6fa488c3f9bd632 (diff)
downloadframeworks_base-01f0ad7c13b8878c2167bff10ea875d7509edca5.zip
frameworks_base-01f0ad7c13b8878c2167bff10ea875d7509edca5.tar.gz
frameworks_base-01f0ad7c13b8878c2167bff10ea875d7509edca5.tar.bz2
Fix clear() operation for rsScriptC.
- This removes a memory leak where some elements were not getting tracked properly (and then triggering an assert when a context is destroyed). - Convert ScriptCState to use a tracked object reference for mScript. - Add a missing clear to FontState. - Clean up synchronization in RSTest so that our graphics context outlives any subtest context. Change-Id: I0d5768c4d2f8810dd1ae2f68b1edd7e150f382fd
Diffstat (limited to 'libs/rs/rsContext.cpp')
-rw-r--r--libs/rs/rsContext.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index b4d5014..cfd6479 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -294,6 +294,7 @@ void * Context::threadProc(void *vrsc)
LOGE("pthread_setspecific %i", status);
}
+ rsc->mScriptC.init(rsc);
if (rsc->mIsGraphicsContext) {
rsc->mStateRaster.init(rsc);
rsc->setRaster(NULL);