diff options
author | Jason Sams <jsams@google.com> | 2013-04-11 16:11:46 -0700 |
---|---|---|
committer | Jason Sams <jsams@google.com> | 2013-04-11 23:35:56 +0000 |
commit | 4961cceab2b71bf0ab59e1b66a7559f67ed28781 (patch) | |
tree | 5a8d59a4cdda64de3609618f8d0a824fed9917b1 /rsContext.cpp | |
parent | 6155dba788849d90d96b05acc63fa6d08d53e95e (diff) | |
download | rs-4961cceab2b71bf0ab59e1b66a7559f67ed28781.tar.gz |
USAGE_IO notifications for new buffers.
bug 8566866
Change-Id: I49767ee902400f09b9b1c174e0fecac5b41e5611
Diffstat (limited to 'rsContext.cpp')
-rw-r--r-- | rsContext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rsContext.cpp b/rsContext.cpp index eec2dcd0..749973aa 100644 --- a/rsContext.cpp +++ b/rsContext.cpp @@ -48,6 +48,7 @@ using namespace android; using namespace android::renderscript; pthread_mutex_t Context::gInitMutex = PTHREAD_MUTEX_INITIALIZER; +pthread_mutex_t Context::gMessageMutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t Context::gLibMutex = PTHREAD_MUTEX_INITIALIZER; bool Context::initGLThread() { @@ -732,7 +733,10 @@ RsMessageToClientType Context::getMessageToClient(void *data, size_t *receiveLen bool Context::sendMessageToClient(const void *data, RsMessageToClientType cmdID, uint32_t subID, size_t len, bool waitForSpace) const { - return mIO.sendToClient(cmdID, subID, data, len, waitForSpace); + pthread_mutex_lock(&gMessageMutex); + bool ret = mIO.sendToClient(cmdID, subID, data, len, waitForSpace); + pthread_mutex_unlock(&gMessageMutex); + return ret; } void Context::initToClient() { |