diff options
| author | Stephen Hines <srhines@google.com> | 2012-11-26 16:26:03 -0800 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2012-11-26 16:26:03 -0800 |
| commit | 76a1be4a35267cf0814fb85fb9b1b5bf887e6ae7 (patch) | |
| tree | 3ea4458c66c924f40a66c8f11ab2d1ab7d87fa07 /cpp/RenderScript.cpp | |
| parent | 7b3e3093f745134345dadf89498ad16e1f9c0e71 (diff) | |
Handle NONE/RESIZE message types properly in C++ API.
Change-Id: Id8d5d6fd922719615706d86cc4997fcd4c0ebba4
Diffstat (limited to 'cpp/RenderScript.cpp')
| -rw-r--r-- | cpp/RenderScript.cpp | 5 |
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: |
