summaryrefslogtreecommitdiff
path: root/libs/rs/rsScriptC_Lib.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-05-28 18:23:22 -0700
committerJason Sams <rjsams@android.com>2010-05-28 18:23:22 -0700
commitf17bccc9050498f51a32a2ee78f5d5a306008e3d (patch)
treed77d5bdaf502bdd34af96732258ed73acd506f2a /libs/rs/rsScriptC_Lib.cpp
parent3255823de062e981f7bfc7994919207988697e45 (diff)
Rough implemetation of ForEach.
Remove launchID from root graphics script. Change-Id: I9f80c0d4df1264f2ee1624a6d7216b9dfdf8502e
Diffstat (limited to 'libs/rs/rsScriptC_Lib.cpp')
-rw-r--r--libs/rs/rsScriptC_Lib.cpp60
1 files changed, 59 insertions, 1 deletions
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 0c10fcaec593..3f3ff23167aa 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -540,7 +540,7 @@ static uint32_t SC_toClient(void *data, int cmdID, int len, int waitForSpace)
static void SC_scriptCall(int scriptID)
{
GET_TLS();
- rsc->runScript((Script *)scriptID, 0);
+ rsc->runScript((Script *)scriptID);
}
int SC_divsi3(int a, int b)
@@ -556,6 +556,58 @@ int SC_getAllocation(const void *ptr)
}
+void SC_ForEachii(RsScript vs, RsAllocation vin)
+{
+ GET_TLS();
+ Script *s = static_cast<Script *>(vs);
+ Allocation *ain = static_cast<Allocation *>(vin);
+ s->runForEach(rsc, ain, NULL);
+}
+
+void SC_ForEachiii(RsScript vs, RsAllocation vin, RsAllocation vout)
+{
+ GET_TLS();
+ Script *s = static_cast<Script *>(vs);
+ Allocation *ain = static_cast<Allocation *>(vin);
+ Allocation *aout = static_cast<Allocation *>(vout);
+ s->runForEach(rsc, ain, aout);
+}
+
+void SC_ForEachiiii(RsScript vs, RsAllocation vin, int xStart, int xEnd)
+{
+ GET_TLS();
+ Script *s = static_cast<Script *>(vs);
+ Allocation *ain = static_cast<Allocation *>(vin);
+ s->runForEach(rsc, ain, NULL, xStart, xEnd);
+}
+
+void SC_ForEachiiiii(RsScript vs, RsAllocation vin, RsAllocation vout, int xStart, int xEnd)
+{
+ GET_TLS();
+ Script *s = static_cast<Script *>(vs);
+ Allocation *ain = static_cast<Allocation *>(vin);
+ Allocation *aout = static_cast<Allocation *>(vout);
+ s->runForEach(rsc, ain, aout, xStart, xEnd);
+}
+
+void SC_ForEachiiiiii(RsScript vs, RsAllocation vin, int xStart, int yStart, int xEnd, int yEnd)
+{
+ GET_TLS();
+ Script *s = static_cast<Script *>(vs);
+ Allocation *ain = static_cast<Allocation *>(vin);
+ s->runForEach(rsc, ain, NULL, xStart, yStart, xEnd, yEnd);
+}
+
+void SC_ForEachiiiiiii(RsScript vs, RsAllocation vin, RsAllocation vout, int xStart, int yStart, int xEnd, int yEnd)
+{
+ GET_TLS();
+ Script *s = static_cast<Script *>(vs);
+ Allocation *ain = static_cast<Allocation *>(vin);
+ Allocation *aout = static_cast<Allocation *>(vout);
+ s->runForEach(rsc, ain, aout, xStart, yStart, xEnd, yEnd);
+}
+
+
//////////////////////////////////////////////////////////////////////////////
// Class implementation
//////////////////////////////////////////////////////////////////////////////
@@ -640,6 +692,12 @@ static ScriptCState::SymbolTable_t gSyms[] = {
{ "rsMatrixScale", (void *)&SC_matrixScale },
{ "rsMatrixTranslate", (void *)&SC_matrixTranslate },
+ { "_Z9rsForEachii", (void *)&SC_ForEachii },
+ { "_Z9rsForEachiii", (void *)&SC_ForEachiii },
+ { "_Z9rsForEachiiii", (void *)&SC_ForEachiiii },
+ { "_Z9rsForEachiiiii", (void *)&SC_ForEachiiiii },
+ { "_Z9rsForEachiiiiii", (void *)&SC_ForEachiiiiii },
+ { "_Z9rsForEachiiiiiii", (void *)&SC_ForEachiiiiiii },
////////////////////////////////////////////////////////////////////