diff options
author | Stephen Hines <srhines@google.com> | 2010-09-20 17:20:30 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2010-09-20 17:20:30 -0700 |
commit | ca54ec302f5bddd1674ea1f36cd3b7c540b2fbca (patch) | |
tree | 2a41d84f4a8f751b207bf679a33c03226657aee3 /libs | |
parent | 9db8abcd1e67a782b4de2cb8609c1eee9e64ca6d (diff) | |
download | frameworks_base-ca54ec302f5bddd1674ea1f36cd3b7c540b2fbca.zip frameworks_base-ca54ec302f5bddd1674ea1f36cd3b7c540b2fbca.tar.gz frameworks_base-ca54ec302f5bddd1674ea1f36cd3b7c540b2fbca.tar.bz2 |
Add support for Float64 (double) to RenderScript.
Change-Id: Iad1c4adadf657a46aa38a3fad7813927e643e29d
Diffstat (limited to 'libs')
-rw-r--r-- | libs/rs/rs.spec | 6 | ||||
-rw-r--r-- | libs/rs/rsScript.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec index c7fb2af..31d70c7 100644 --- a/libs/rs/rs.spec +++ b/libs/rs/rs.spec @@ -338,6 +338,12 @@ ScriptSetVarF { param float value } +ScriptSetVarD { + param RsScript s + param uint32_t slot + param double value + } + ScriptSetVarV { param RsScript s param uint32_t slot diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp index fc22fc3..43bb09e 100644 --- a/libs/rs/rsScript.cpp +++ b/libs/rs/rsScript.cpp @@ -101,6 +101,12 @@ void rsi_ScriptSetVarF(Context *rsc, RsScript vs, uint32_t slot, float value) s->setVar(slot, &value, sizeof(value)); } +void rsi_ScriptSetVarD(Context *rsc, RsScript vs, uint32_t slot, double value) +{ + Script *s = static_cast<Script *>(vs); + s->setVar(slot, &value, sizeof(value)); +} + void rsi_ScriptSetVarV(Context *rsc, RsScript vs, uint32_t slot, const void *data, uint32_t len) { const float *fp = (const float *)data; |