Fix minor C++ api issues.

Change-Id: I30e12938be5da52b2d952db57a51b4deb5e27239
This commit is contained in:
Jason Sams
2012-03-14 15:36:02 -07:00
parent 89ea4ca9c2
commit d1c8c1292c
6 changed files with 147 additions and 87 deletions

View File

@@ -25,12 +25,12 @@
#include "Allocation.h"
#include "Script.h"
void Script::invoke(uint32_t slot, const void *v, size_t len) {
void Script::invoke(uint32_t slot, const void *v, size_t len) const {
rsScriptInvokeV(mRS->mContext, getID(), slot, v, len);
}
void Script::forEach(uint32_t slot, const Allocation *ain, const Allocation *aout,
const void *usr, size_t usrLen) {
const void *usr, size_t usrLen) const {
if ((ain == NULL) && (aout == NULL)) {
mRS->throwError("At least one of ain or aout is required to be non-null.");
}
@@ -44,16 +44,16 @@ Script::Script(void *id, RenderScript *rs) : BaseObj(id, rs) {
}
void Script::bindAllocation(const Allocation *va, uint32_t slot) {
void Script::bindAllocation(const Allocation *va, uint32_t slot) const {
rsScriptBindAllocation(mRS->mContext, getID(), BaseObj::getObjID(va), slot);
}
void Script::setVar(uint32_t index, const BaseObj *o) {
void Script::setVar(uint32_t index, const BaseObj *o) const {
rsScriptSetVarObj(mRS->mContext, getID(), index, (o == NULL) ? 0 : o->getID());
}
void Script::setVar(uint32_t index, const void *v, size_t len) {
void Script::setVar(uint32_t index, const void *v, size_t len) const {
rsScriptSetVarV(mRS->mContext, getID(), index, v, len);
}