summaryrefslogtreecommitdiffstats
path: root/rs/java
diff options
context:
space:
mode:
authorYang Ni <yangni@google.com>2015-04-14 17:02:33 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-14 17:02:33 +0000
commit5024f20a85ed28e637fd61d0a2cb7c87a2e9322a (patch)
treeca84f0a4a6591609a5d58b29490386f087eb0fec /rs/java
parentb3a0660eabeb4d4bd7ae539ca48c0f9d22b31890 (diff)
parent0933905375790eb850334b53fd6d0981bd40e007 (diff)
downloadframeworks_base-5024f20a85ed28e637fd61d0a2cb7c87a2e9322a.zip
frameworks_base-5024f20a85ed28e637fd61d0a2cb7c87a2e9322a.tar.gz
frameworks_base-5024f20a85ed28e637fd61d0a2cb7c87a2e9322a.tar.bz2
am 09339053: am 6ca1e45a: am 8704ae46: Merge "Add name to ScriptGroup2.Builder.create() method"
* commit '0933905375790eb850334b53fd6d0981bd40e007': Add name to ScriptGroup2.Builder.create() method
Diffstat (limited to 'rs/java')
-rw-r--r--rs/java/android/renderscript/RenderScript.java8
-rw-r--r--rs/java/android/renderscript/ScriptGroup2.java8
2 files changed, 10 insertions, 6 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index 5fc1f93..7c927fd 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -332,10 +332,12 @@ public class RenderScript {
rsnClosureSetGlobal(mContext, closureID, fieldID, value, size);
}
- native long rsnScriptGroup2Create(long con, String cachePath, long[] closures);
- synchronized long nScriptGroup2Create(String cachePath, long[] closures) {
+ native long rsnScriptGroup2Create(long con, String name, String cachePath,
+ long[] closures);
+ synchronized long nScriptGroup2Create(String name, String cachePath,
+ long[] closures) {
validate();
- return rsnScriptGroup2Create(mContext, cachePath, closures);
+ return rsnScriptGroup2Create(mContext, name, cachePath, closures);
}
native void rsnScriptGroup2Execute(long con, long groupID);
diff --git a/rs/java/android/renderscript/ScriptGroup2.java b/rs/java/android/renderscript/ScriptGroup2.java
index 858a957..96bb6e2 100644
--- a/rs/java/android/renderscript/ScriptGroup2.java
+++ b/rs/java/android/renderscript/ScriptGroup2.java
@@ -323,6 +323,7 @@ public class ScriptGroup2 extends BaseObj {
}
}
+ String mName;
List<Closure> mClosures;
List<UnboundValue> mInputs;
Future[] mOutputs;
@@ -333,9 +334,10 @@ public class ScriptGroup2 extends BaseObj {
super(id, rs);
}
- ScriptGroup2(RenderScript rs, List<Closure> closures,
+ ScriptGroup2(RenderScript rs, String name, List<Closure> closures,
List<UnboundValue> inputs, Future[] outputs) {
super(0, rs);
+ mName = name;
mClosures = closures;
mInputs = inputs;
mOutputs = outputs;
@@ -344,7 +346,7 @@ public class ScriptGroup2 extends BaseObj {
for (int i = 0; i < closureIDs.length; i++) {
closureIDs[i] = closures.get(i).getID(rs);
}
- long id = rs.nScriptGroup2Create(ScriptC.mCachePath, closureIDs);
+ long id = rs.nScriptGroup2Create(name, ScriptC.mCachePath, closureIDs);
setID(id);
}
@@ -560,7 +562,7 @@ public class ScriptGroup2 extends BaseObj {
!name.equals(name.replaceAll("[^a-zA-Z0-9-]", "_"))) {
throw new RSIllegalArgumentException("invalid script group name");
}
- ScriptGroup2 ret = new ScriptGroup2(mRS, mClosures, mInputs, outputs);
+ ScriptGroup2 ret = new ScriptGroup2(mRS, name, mClosures, mInputs, outputs);
return ret;
}