summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsScriptC_Lib.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-10-06 13:58:47 -0700
committerJason Sams <rjsams@android.com>2009-10-06 13:58:47 -0700
commit516c31911578db8ce53529483c3ded918ac7dc6b (patch)
treeeee49f301e720ddfa249375abf611d550a0fba5d /libs/rs/rsScriptC_Lib.cpp
parentf7ae77cd67f1a3993b8e56c1af4720a7adf4e69d (diff)
downloadframeworks_base-516c31911578db8ce53529483c3ded918ac7dc6b.zip
frameworks_base-516c31911578db8ce53529483c3ded918ac7dc6b.tar.gz
frameworks_base-516c31911578db8ce53529483c3ded918ac7dc6b.tar.bz2
Implement data push from scripts. Fixes the problem where apps would have to poll to monitor a scripts state.
Fix bug in StoreState where state could be overridden by the default unless the script used more than one state. Change only impacts renderscript and renderscript apps.
Diffstat (limited to 'libs/rs/rsScriptC_Lib.cpp')
-rw-r--r--libs/rs/rsScriptC_Lib.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 17d14f5..9a96290 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -1002,6 +1002,12 @@ static uint32_t SC_colorFloatRGBAto565(float r, float g, float b)
return rs888to565(ir, ig, ib);
}
+static uint32_t SC_toClient(void *data, int cmdID, int len, int waitForSpace)
+{
+ GET_TLS();
+ return rsc->sendMessageToClient(data, cmdID, len, waitForSpace != 0);
+}
+
//////////////////////////////////////////////////////////////////////////////
// Class implementation
//////////////////////////////////////////////////////////////////////////////
@@ -1270,6 +1276,8 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = {
{ "getHeight", (void *)&SC_getHeight,
"int", "()" },
+ { "sendToClient", (void *)&SC_toClient,
+ "int", "(void *data, int cmdID, int len, int waitForSpace)" },
{ "debugF", (void *)&SC_debugF,