diff options
| author | 2009-12-09 11:05:45 -0800 | |
|---|---|---|
| committer | 2009-12-09 11:05:45 -0800 | |
| commit | b9d5c574ff11a9470b92c5b9a62da6a655d9ef7a (patch) | |
| tree | 34cf34d887ef839c36fd14fa034ef71156137fd7 /libs/rs/rsScriptC.cpp | |
| parent | d59fb6e7435b57d83662b196f5430e6f2bc5427b (diff) | |
Throttle low priority RS threads by sleeping once per frame to avoid starving other apps.
Diffstat (limited to 'libs/rs/rsScriptC.cpp')
| -rw-r--r-- | libs/rs/rsScriptC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 073d98bf4e1b..f11b862af61b 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -60,7 +60,7 @@ void ScriptC::setupScript() } -bool ScriptC::run(Context *rsc, uint32_t launchIndex) +uint32_t ScriptC::run(Context *rsc, uint32_t launchIndex) { Context::ScriptTLSStruct * tls = (Context::ScriptTLSStruct *)pthread_getspecific(Context::gThreadTLSKey); @@ -85,9 +85,9 @@ bool ScriptC::run(Context *rsc, uint32_t launchIndex) } setupScript(); - bool ret = false; + uint32_t ret = 0; tls->mScript = this; - ret = mProgram.mScript(launchIndex) != 0; + ret = mProgram.mScript(launchIndex); tls->mScript = NULL; return ret; } |