diff options
author | Jason Sams <rjsams@android.com> | 2010-06-08 15:40:48 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-06-08 15:40:48 -0700 |
commit | e29f3e74f71ea730519ff8ae1d8dd4c1630bbaf9 (patch) | |
tree | 48ca5c2daefa4ff854f48db7366045657f1db9de /libs/rs/rsScriptC.cpp | |
parent | 0b0255bcdebb3c50a44327a931a7223f0770287a (diff) |
Begin using reflected files.
Change-Id: I5307a0eac9c206b85c0cf7451d3f8300134bf8e3
Diffstat (limited to 'libs/rs/rsScriptC.cpp')
-rw-r--r-- | libs/rs/rsScriptC.cpp | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 374a07f923ab..ef372860a9e6 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -196,32 +196,9 @@ void ScriptC::Invoke(Context *rsc, uint32_t slot, const void *data, uint32_t len setupScript(rsc); Script * oldTLS = setTLS(this); - const uint32_t * dPtr = (const uint32_t *)data; - switch(len) { - case 0: - mEnviroment.mInvokeFunctions[slot](); - break; - case 4: - ((void (*)(uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0]); - break; - case 8: - ((void (*)(uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1]); - break; - case 12: - ((void (*)(uint32_t, uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1], dPtr[2]); - break; - case 16: - ((void (*)(uint32_t, uint32_t, uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1], dPtr[2], dPtr[3]); - break; - case 20: - ((void (*)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)) - mEnviroment.mInvokeFunctions[slot])(dPtr[0], dPtr[1], dPtr[2], dPtr[3], dPtr[4]); - break; - } + ((void (*)(const void *, uint32_t)) + mEnviroment.mInvokeFunctions[slot])(data, len); + setTLS(oldTLS); } |