diff options
author | Jason Sams <rjsams@android.com> | 2010-05-17 14:55:34 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-05-17 14:55:34 -0700 |
commit | 1de0b87168837cfcd9318bec5c97d2e7d78d3293 (patch) | |
tree | 6b6cd8ea2a55597e3fd3573072cb85af892be731 /libs/rs/rsScriptC_Lib.cpp | |
parent | 38a9544825c6f3482237f9e29cddee58ebc093c3 (diff) |
Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.
Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
Diffstat (limited to 'libs/rs/rsScriptC_Lib.cpp')
-rw-r--r-- | libs/rs/rsScriptC_Lib.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp index 0e094748c4a1..19dfaffcb548 100644 --- a/libs/rs/rsScriptC_Lib.cpp +++ b/libs/rs/rsScriptC_Lib.cpp @@ -1113,6 +1113,14 @@ int SC_divsi3(int a, int b) return a / b; } +int SC_getAllocation(const void *ptr) +{ + GET_TLS(); + const Allocation *alloc = sc->ptrToAllocation(ptr); + return (int)alloc; +} + + ////////////////////////////////////////////////////////////////////////////// // Class implementation ////////////////////////////////////////////////////////////////////////////// @@ -1368,6 +1376,8 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = { { "debugPi", (void *)&SC_debugPi }, { "scriptCall", (void *)&SC_scriptCall }, + { "rsGetAllocation", (void *)&SC_getAllocation }, + { NULL, NULL } }; |