Avoid accessing TLS in rsClearObject()
rsClearObject() may be called on rsContextDestroy() in the JNI thread,
where TLS is not initialized.
This also reverted Icca50fade1199b6f530f963e9e694366b7d8cf67 that
made rsContextDestroy() go through the FIFO. rsContextDestroy() must
happen off the FIFO, since it joins the FIFO consuming thread.
Both the rsClearObject() change and the rsContextDestroy() revert need
to go together to make RenderScript and Camera CTS tests pass. Hence
this single CL for both changes.
8 files changed