Implement data push from scripts. Fixes the problem where apps would have to poll to monitor a scripts state.
Fix bug in StoreState where state could be overridden by the default unless the script used more than one state.
Change only impacts renderscript and renderscript apps.
diff --git a/rsLocklessFifo.cpp b/rsLocklessFifo.cpp
index b0540a6..085a81e 100644
--- a/rsLocklessFifo.cpp
+++ b/rsLocklessFifo.cpp
@@ -99,6 +99,9 @@
void LocklessCommandFifo::commit(uint32_t command, uint32_t sizeInBytes)
{
+ if (mInShutdown) {
+ return;
+ }
//dumpState("commit 1");
reinterpret_cast<uint16_t *>(mPut)[0] = command;
reinterpret_cast<uint16_t *>(mPut)[1] = sizeInBytes;
@@ -109,6 +112,9 @@
void LocklessCommandFifo::commitSync(uint32_t command, uint32_t sizeInBytes)
{
+ if (mInShutdown) {
+ return;
+ }
commit(command, sizeInBytes);
flush();
}