summaryrefslogtreecommitdiffstats
path: root/rsScriptC_Lib.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-05-17 14:55:34 -0700
committerJason Sams <rjsams@android.com>2010-05-17 14:55:34 -0700
commitce92d4baf7a5bce097228fdd4498601764cd4014 (patch)
treecb18dc86df54c5740f1b061d7e0eeda1a0d83314 /rsScriptC_Lib.cpp
parent568613e5c043c473e5e6632b3a38de2a97864908 (diff)
downloadandroid_frameworks_rs-ce92d4baf7a5bce097228fdd4498601764cd4014.tar.gz
android_frameworks_rs-ce92d4baf7a5bce097228fdd4498601764cd4014.tar.bz2
android_frameworks_rs-ce92d4baf7a5bce097228fdd4498601764cd4014.zip
Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.
Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
Diffstat (limited to 'rsScriptC_Lib.cpp')
-rw-r--r--rsScriptC_Lib.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/rsScriptC_Lib.cpp b/rsScriptC_Lib.cpp
index 0e094748..19dfaffc 100644
--- a/rsScriptC_Lib.cpp
+++ b/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 }
};