summaryrefslogtreecommitdiff
path: root/cpp/RenderScript.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2012-11-26 16:26:03 -0800
committerStephen Hines <srhines@google.com>2012-11-26 16:26:03 -0800
commit76a1be4a35267cf0814fb85fb9b1b5bf887e6ae7 (patch)
tree3ea4458c66c924f40a66c8f11ab2d1ab7d87fa07 /cpp/RenderScript.cpp
parent7b3e3093f745134345dadf89498ad16e1f9c0e71 (diff)
Handle NONE/RESIZE message types properly in C++ API.
Change-Id: Id8d5d6fd922719615706d86cc4997fcd4c0ebba4
Diffstat (limited to 'cpp/RenderScript.cpp')
-rw-r--r--cpp/RenderScript.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/RenderScript.cpp b/cpp/RenderScript.cpp
index ffc0ce67..4ce4c9ba 100644
--- a/cpp/RenderScript.cpp
+++ b/cpp/RenderScript.cpp
@@ -128,10 +128,13 @@ void * RS::threadProc(void *vrsc) {
rs->mErrorFunc(usrID, (const char *)rbuf);
}
break;
+ case RS_MESSAGE_TO_CLIENT_NONE:
case RS_MESSAGE_TO_CLIENT_EXCEPTION:
+ case RS_MESSAGE_TO_CLIENT_RESIZE:
// teardown. But we want to avoid starving other threads during
// teardown by yielding until the next line in the destructor can
- // execute to set mRun = false
+ // execute to set mRun = false. Note that the FIFO sends an
+ // empty NONE message when it reaches its destructor.
usleep(1000);
break;
case RS_MESSAGE_TO_CLIENT_USER: