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
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp
index 4f8d8df..12dedac 100644
--- a/libs/rs/rsFont.cpp
+++ b/libs/rs/rsFont.cpp
@@ -743,6 +743,8 @@
{
mInitialized = false;
+ mFontShaderFConstant.clear();
+
mIndexBuffer.clear();
mVertexArray.clear();