Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.
Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 0e09474..19dfaff 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -1113,6 +1113,14 @@
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 @@
{ "debugPi", (void *)&SC_debugPi },
{ "scriptCall", (void *)&SC_scriptCall },
+ { "rsGetAllocation", (void *)&SC_getAllocation },
+
{ NULL, NULL }
};