From 2d71bc7b4c46a32cead32a35e6e137d13e8315ea Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Fri, 26 Mar 2010 16:06:43 -0700 Subject: Update Script java classes and llvm samples. Change-Id: I05c8d63fcca095d4fea6abb1ff5736ab9d78a3e6 --- graphics/java/android/renderscript/Script.java | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'graphics/java/android/renderscript/Script.java') diff --git a/graphics/java/android/renderscript/Script.java b/graphics/java/android/renderscript/Script.java index 57ccfa36325b..0d21368242ec 100644 --- a/graphics/java/android/renderscript/Script.java +++ b/graphics/java/android/renderscript/Script.java @@ -42,6 +42,10 @@ public class Script extends BaseObj { } } + protected void invoke(int slot) { + mRS.nScriptInvoke(mID, slot); + } + Script(int id, RenderScript rs) { super(rs); mID = id; @@ -145,5 +149,48 @@ public class Script extends BaseObj { } + + public static class FieldBase { + protected Element mElement; + protected Type mType; + protected Allocation mAllocation; + + protected void init(RenderScript rs, int dimx) { + mAllocation = Allocation.createSized(rs, mElement, dimx); + mType = mAllocation.getType(); + } + + protected FieldBase() { + } + + public Element getElement() { + return mElement; + } + + public Type getType() { + return mType; + } + + public Allocation getAllocation() { + return mAllocation; + } + + //@Override + public void updateAllocation() { + } + + + // + /* + public class ScriptField_UserField + extends android.renderscript.Script.FieldBase { + + protected + + } + + */ + + } } -- cgit v1.2.3